diff options
Diffstat (limited to 'src/lj_asm_mips.h')
-rw-r--r-- | src/lj_asm_mips.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lj_asm_mips.h b/src/lj_asm_mips.h index f5b0bab6..e5c67b53 100644 --- a/src/lj_asm_mips.h +++ b/src/lj_asm_mips.h | |||
@@ -394,6 +394,7 @@ static void asm_retf(ASMState *as, IRIns *ir) | |||
394 | int32_t delta = 1+bc_a(*((const BCIns *)pc - 1)); | 394 | int32_t delta = 1+bc_a(*((const BCIns *)pc - 1)); |
395 | as->topslot -= (BCReg)delta; | 395 | as->topslot -= (BCReg)delta; |
396 | if ((int32_t)as->topslot < 0) as->topslot = 0; | 396 | if ((int32_t)as->topslot < 0) as->topslot = 0; |
397 | irt_setmark(IR(REF_BASE)->t); /* Children must not coalesce with BASE reg. */ | ||
397 | emit_setgl(as, base, jit_base); | 398 | emit_setgl(as, base, jit_base); |
398 | emit_addptr(as, base, -8*delta); | 399 | emit_addptr(as, base, -8*delta); |
399 | asm_guard(as, MIPSI_BNE, RID_TMP, | 400 | asm_guard(as, MIPSI_BNE, RID_TMP, |
@@ -1723,7 +1724,7 @@ static void asm_head_root_base(ASMState *as) | |||
1723 | if (as->loopinv) as->mctop--; | 1724 | if (as->loopinv) as->mctop--; |
1724 | if (ra_hasreg(r)) { | 1725 | if (ra_hasreg(r)) { |
1725 | ra_free(as, r); | 1726 | ra_free(as, r); |
1726 | if (rset_test(as->modset, r)) | 1727 | if (rset_test(as->modset, r) || irt_ismarked(ir->t)) |
1727 | ir->r = RID_INIT; /* No inheritance for modified BASE register. */ | 1728 | ir->r = RID_INIT; /* No inheritance for modified BASE register. */ |
1728 | if (r != RID_BASE) | 1729 | if (r != RID_BASE) |
1729 | emit_move(as, r, RID_BASE); | 1730 | emit_move(as, r, RID_BASE); |
@@ -1738,7 +1739,7 @@ static RegSet asm_head_side_base(ASMState *as, IRIns *irp, RegSet allow) | |||
1738 | if (as->loopinv) as->mctop--; | 1739 | if (as->loopinv) as->mctop--; |
1739 | if (ra_hasreg(r)) { | 1740 | if (ra_hasreg(r)) { |
1740 | ra_free(as, r); | 1741 | ra_free(as, r); |
1741 | if (rset_test(as->modset, r)) | 1742 | if (rset_test(as->modset, r) || irt_ismarked(ir->t)) |
1742 | ir->r = RID_INIT; /* No inheritance for modified BASE register. */ | 1743 | ir->r = RID_INIT; /* No inheritance for modified BASE register. */ |
1743 | if (irp->r == r) { | 1744 | if (irp->r == r) { |
1744 | rset_clear(allow, r); /* Mark same BASE register as coalesced. */ | 1745 | rset_clear(allow, r); /* Mark same BASE register as coalesced. */ |