From 2e614adb21b3c0c46038a7897b88accab2498ec4 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Mon, 8 Mar 2010 23:43:16 +0100 Subject: [PATCH] Do not fuse SLOAD across RETF. --- src/lj_asm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lj_asm.c b/src/lj_asm.c index 367fe430..cd1c0dbd 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c @@ -1277,7 +1277,8 @@ static Reg asm_fuseload(ASMState *as, IRRef ref, RegSet allow) } else if (mayfuse(as, ref)) { RegSet xallow = (allow & RSET_GPR) ? allow : RSET_GPR; if (ir->o == IR_SLOAD) { - if (!irt_isint(ir->t) && !(ir->op2 & IRSLOAD_PARENT)) { + if (!irt_isint(ir->t) && !(ir->op2 & IRSLOAD_PARENT) && + noconflict(as, ref, IR_RETF)) { as->mrm.base = (uint8_t)ra_alloc1(as, REF_BASE, xallow); as->mrm.ofs = 8*((int32_t)ir->op1-1); as->mrm.idx = RID_NONE;