summaryrefslogtreecommitdiff
path: root/src/lj_asm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_asm.c')
-rw-r--r--src/lj_asm.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c
index b89b8543..a4d0c606 100644
--- a/src/lj_asm.c
+++ b/src/lj_asm.c
@@ -738,11 +738,14 @@ static Reg ra_allocref(ASMState *as, IRRef ref, RegSet allow)
738 } 738 }
739 RA_DBGX((as, "hintmiss $f $r", ref, r)); 739 RA_DBGX((as, "hintmiss $f $r", ref, r));
740 } 740 }
741 /* Invariants should preferably get unused registers. */ 741 /* Invariants should preferably get unmodified registers. */
742 if (ref < as->loopref && !irt_isphi(ir->t)) 742 if (ref < as->loopref && !irt_isphi(ir->t)) {
743 r = rset_pickbot(pick); 743 if ((pick & ~as->modset))
744 else 744 pick &= ~as->modset;
745 r = rset_pickbot(pick); /* Reduce conflicts with inverse allocation. */
746 } else {
745 r = rset_picktop(pick); 747 r = rset_picktop(pick);
748 }
746 } else { 749 } else {
747 r = ra_evict(as, allow); 750 r = ra_evict(as, allow);
748 } 751 }