From: Mike Pall Date: Sun, 12 Nov 2023 14:41:52 +0000 (+0100) Subject: x86/x64: Don't fuse loads across table.clear. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=45c88b7963de2969a9a656c03ba06ad995d7fd5f;p=thirdparty%2FLuaJIT.git x86/x64: Don't fuse loads across table.clear. Reported by Peter Cawley. #1117 --- diff --git a/src/lj_asm_x86.h b/src/lj_asm_x86.h index d98fb827..a105b439 100644 --- a/src/lj_asm_x86.h +++ b/src/lj_asm_x86.h @@ -473,6 +473,7 @@ static Reg asm_fuseload(ASMState *as, IRRef ref, RegSet allow) } } else if (ir->o == IR_ALOAD || ir->o == IR_HLOAD || ir->o == IR_ULOAD) { if (noconflict(as, ref, ir->o + IRDELTA_L2S, 0) && + noconflict(as, ref, IR_CALLS, 0) && /* Don't cross table.clear. */ !(LJ_GC64 && irt_isaddr(ir->t))) { asm_fuseahuref(as, ir->op1, xallow); return RID_MRM;