aboutsummaryrefslogtreecommitdiff
path: root/src/lj_asm_arm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_asm_arm.h')
-rw-r--r--src/lj_asm_arm.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lj_asm_arm.h b/src/lj_asm_arm.h
index 0ab3a567..72f205d9 100644
--- a/src/lj_asm_arm.h
+++ b/src/lj_asm_arm.h
@@ -493,6 +493,7 @@ static void asm_retf(ASMState *as, IRIns *ir)
493 int32_t delta = 1+bc_a(*((const BCIns *)pc - 1)); 493 int32_t delta = 1+bc_a(*((const BCIns *)pc - 1));
494 as->topslot -= (BCReg)delta; 494 as->topslot -= (BCReg)delta;
495 if ((int32_t)as->topslot < 0) as->topslot = 0; 495 if ((int32_t)as->topslot < 0) as->topslot = 0;
496 irt_setmark(IR(REF_BASE)->t); /* Children must not coalesce with BASE reg. */
496 /* Need to force a spill on REF_BASE now to update the stack slot. */ 497 /* Need to force a spill on REF_BASE now to update the stack slot. */
497 emit_lso(as, ARMI_STR, base, RID_SP, ra_spill(as, IR(REF_BASE))); 498 emit_lso(as, ARMI_STR, base, RID_SP, ra_spill(as, IR(REF_BASE)));
498 emit_setgl(as, base, jit_base); 499 emit_setgl(as, base, jit_base);
@@ -2102,7 +2103,8 @@ static void asm_head_root_base(ASMState *as)
2102 IRIns *ir; 2103 IRIns *ir;
2103 asm_head_lreg(as); 2104 asm_head_lreg(as);
2104 ir = IR(REF_BASE); 2105 ir = IR(REF_BASE);
2105 if (ra_hasreg(ir->r) && rset_test(as->modset, ir->r)) ra_spill(as, ir); 2106 if (ra_hasreg(ir->r) && (rset_test(as->modset, ir->r) || irt_ismarked(ir->t)))
2107 ra_spill(as, ir);
2106 ra_destreg(as, ir, RID_BASE); 2108 ra_destreg(as, ir, RID_BASE);
2107} 2109}
2108 2110
@@ -2112,7 +2114,8 @@ static RegSet asm_head_side_base(ASMState *as, IRIns *irp, RegSet allow)
2112 IRIns *ir; 2114 IRIns *ir;
2113 asm_head_lreg(as); 2115 asm_head_lreg(as);
2114 ir = IR(REF_BASE); 2116 ir = IR(REF_BASE);
2115 if (ra_hasreg(ir->r) && rset_test(as->modset, ir->r)) ra_spill(as, ir); 2117 if (ra_hasreg(ir->r) && (rset_test(as->modset, ir->r) || irt_ismarked(ir->t)))
2118 ra_spill(as, ir);
2116 if (ra_hasspill(irp->s)) { 2119 if (ra_hasspill(irp->s)) {
2117 rset_clear(allow, ra_dest(as, ir, allow)); 2120 rset_clear(allow, ra_dest(as, ir, allow));
2118 } else { 2121 } else {