mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 15:14:08 +00:00
parent
43eff4aad4
commit
44da356e97
@ -1947,6 +1947,7 @@ static void asm_hiop(ASMState *as, IRIns *ir)
|
||||
static void asm_stack_check(ASMState *as, BCReg topslot,
|
||||
IRIns *irp, RegSet allow, ExitNo exitno)
|
||||
{
|
||||
int savereg = 0;
|
||||
Reg pbase;
|
||||
uint32_t k;
|
||||
if (irp) {
|
||||
@ -1957,12 +1958,14 @@ static void asm_stack_check(ASMState *as, BCReg topslot,
|
||||
pbase = rset_pickbot(allow);
|
||||
} else {
|
||||
pbase = RID_RET;
|
||||
emit_lso(as, ARMI_LDR, RID_RET, RID_SP, 0); /* Restore temp. register. */
|
||||
savereg = 1;
|
||||
}
|
||||
} else {
|
||||
pbase = RID_BASE;
|
||||
}
|
||||
emit_branch(as, ARMF_CC(ARMI_BL, CC_LS), exitstub_addr(as->J, exitno));
|
||||
if (savereg)
|
||||
emit_lso(as, ARMI_LDR, RID_RET, RID_SP, 0); /* Restore temp. register. */
|
||||
k = emit_isk12(0, (int32_t)(8*topslot));
|
||||
lua_assert(k);
|
||||
emit_n(as, ARMI_CMP^k, RID_TMP);
|
||||
@ -1974,7 +1977,7 @@ static void asm_stack_check(ASMState *as, BCReg topslot,
|
||||
if (ra_hasspill(irp->s))
|
||||
emit_lso(as, ARMI_LDR, pbase, RID_SP, sps_scale(irp->s));
|
||||
emit_lso(as, ARMI_LDR, RID_TMP, RID_TMP, (i & 4095));
|
||||
if (ra_hasspill(irp->s) && !allow)
|
||||
if (savereg)
|
||||
emit_lso(as, ARMI_STR, RID_RET, RID_SP, 0); /* Save temp. register. */
|
||||
emit_loadi(as, RID_TMP, (i & ~4095));
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user