summaryrefslogtreecommitdiff
path: root/src/lj_asm_mips.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_asm_mips.h')
-rw-r--r--src/lj_asm_mips.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lj_asm_mips.h b/src/lj_asm_mips.h
index b45776d4..bc521596 100644
--- a/src/lj_asm_mips.h
+++ b/src/lj_asm_mips.h
@@ -375,6 +375,7 @@ static void asm_retf(ASMState *as, IRIns *ir)
375 int32_t delta = 1+bc_a(*((const BCIns *)pc - 1)); 375 int32_t delta = 1+bc_a(*((const BCIns *)pc - 1));
376 as->topslot -= (BCReg)delta; 376 as->topslot -= (BCReg)delta;
377 if ((int32_t)as->topslot < 0) as->topslot = 0; 377 if ((int32_t)as->topslot < 0) as->topslot = 0;
378 irt_setmark(IR(REF_BASE)->t); /* Children must not coalesce with BASE reg. */
378 emit_setgl(as, base, jit_base); 379 emit_setgl(as, base, jit_base);
379 emit_addptr(as, base, -8*delta); 380 emit_addptr(as, base, -8*delta);
380 asm_guard(as, MIPSI_BNE, RID_TMP, 381 asm_guard(as, MIPSI_BNE, RID_TMP,
@@ -1697,7 +1698,7 @@ static void asm_head_root_base(ASMState *as)
1697 if (as->loopinv) as->mctop--; 1698 if (as->loopinv) as->mctop--;
1698 if (ra_hasreg(r)) { 1699 if (ra_hasreg(r)) {
1699 ra_free(as, r); 1700 ra_free(as, r);
1700 if (rset_test(as->modset, r)) 1701 if (rset_test(as->modset, r) || irt_ismarked(ir->t))
1701 ir->r = RID_INIT; /* No inheritance for modified BASE register. */ 1702 ir->r = RID_INIT; /* No inheritance for modified BASE register. */
1702 if (r != RID_BASE) 1703 if (r != RID_BASE)
1703 emit_move(as, r, RID_BASE); 1704 emit_move(as, r, RID_BASE);
@@ -1712,7 +1713,7 @@ static RegSet asm_head_side_base(ASMState *as, IRIns *irp, RegSet allow)
1712 if (as->loopinv) as->mctop--; 1713 if (as->loopinv) as->mctop--;
1713 if (ra_hasreg(r)) { 1714 if (ra_hasreg(r)) {
1714 ra_free(as, r); 1715 ra_free(as, r);
1715 if (rset_test(as->modset, r)) 1716 if (rset_test(as->modset, r) || irt_ismarked(ir->t))
1716 ir->r = RID_INIT; /* No inheritance for modified BASE register. */ 1717 ir->r = RID_INIT; /* No inheritance for modified BASE register. */
1717 if (irp->r == r) { 1718 if (irp->r == r) {
1718 rset_clear(allow, r); /* Mark same BASE register as coalesced. */ 1719 rset_clear(allow, r); /* Mark same BASE register as coalesced. */