From 32309583e584b565d78d6be8218023cd53732cfe Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Tue, 2 Mar 2010 23:34:13 +0100 Subject: Improve register allocation on x64. --- src/lj_asm.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/lj_asm.c b/src/lj_asm.c index 34357e95..14d7dbd4 100644 --- a/src/lj_asm.c +++ b/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 { -- cgit v1.2.3-55-g6feb