TCA emitCallArrayPrologue(Func* func, DVFuncletsVec& dvs) { auto& mainCode = mcg->code.main(); auto& frozenCode = mcg->code.frozen(); vixl::MacroAssembler a { mainCode }; vixl::MacroAssembler afrozen { frozenCode }; TCA start = mainCode.frontier(); a. Ldr (rAsm.W(), rVmFp[AROFF(m_numArgsAndFlags)]); for (auto i = 0; i < dvs.size(); ++i) { a. Cmp (rAsm.W(), dvs[i].first); emitBindJ(mainCode, frozenCode, CC_LE, SrcKey(func, dvs[i].second, false)); } emitBindJ(mainCode, frozenCode, CC_None, SrcKey(func, func->base(), false)); mcg->cgFixups().process(nullptr); return start; }
void emitBindJmp(CodeBlock& cb, CodeBlock& stubs, SrcKey dest) { emitBindJ(cb, stubs, JIT::CC_None, dest, REQ_BIND_JMP); }
void emitBindJcc(CodeBlock& cb, CodeBlock& stubs, JIT::ConditionCode cc, SrcKey dest) { emitBindJ(cb, stubs, cc, dest, REQ_BIND_JCC); }
void emitBindSideExit(CodeBlock& cb, CodeBlock& stubs, JIT::ConditionCode cc, SrcKey dest) { emitBindJ(cb, stubs, cc, dest, REQ_BIND_SIDE_EXIT); }
void Vgen::emit(bindjmp& i) { // XXX what about trflags emitBindJ(*codeBlock, frozen(), CC_None, i.target); }
void Vgen::emit(bindjcc& i) { emitBindJ(*codeBlock, frozen(), i.cc, i.target); }