]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
x86/x64: Don't fuse loads across table.clear.
authorMike Pall <mike>
Sun, 12 Nov 2023 14:41:52 +0000 (15:41 +0100)
committerMike Pall <mike>
Sun, 12 Nov 2023 14:41:52 +0000 (15:41 +0100)
Reported by Peter Cawley. #1117

src/lj_asm_x86.h

index d98fb827688676fa838d8de5a69ee4cc22f569c0..a105b4391caddbb574fee9b32d7231244c9a7305 100644 (file)
@@ -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;