Explorar o código

Improve register allocation on x64.

Mike Pall %!s(int64=15) %!d(string=hai) anos
pai
achega
32309583e5
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      src/lj_asm.c

+ 5 - 0
src/lj_asm.c

@@ -791,6 +791,11 @@ static Reg ra_allocref(ASMState *as, IRRef ref, RegSet allow)
 	pick &= ~as->modset;
       r = rset_pickbot(pick);  /* Reduce conflicts with inverse allocation. */
     } else {
+#if LJ_64
+      /* We've got plenty of regs, so get callee-save regs if possible. */
+      if ((pick & ~RSET_SCRATCH))
+	pick &= ~RSET_SCRATCH;
+#endif
       r = rset_picktop(pick);
     }
   } else {