diff options
author | Mike Pall <mike> | 2023-11-12 15:41:52 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2023-11-12 15:41:52 +0100 |
commit | 45c88b7963de2969a9a656c03ba06ad995d7fd5f (patch) | |
tree | 53437b40a467171fa229d54401370f651553d9b5 | |
parent | 6807e60af13c7f9a582dbf4cabc56e57dc791808 (diff) | |
download | luajit-45c88b7963de2969a9a656c03ba06ad995d7fd5f.tar.gz luajit-45c88b7963de2969a9a656c03ba06ad995d7fd5f.tar.bz2 luajit-45c88b7963de2969a9a656c03ba06ad995d7fd5f.zip |
x86/x64: Don't fuse loads across table.clear.
Reported by Peter Cawley. #1117
-rw-r--r-- | src/lj_asm_x86.h | 1 |
1 files changed, 1 insertions, 0 deletions
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) | |||
473 | } | 473 | } |
474 | } else if (ir->o == IR_ALOAD || ir->o == IR_HLOAD || ir->o == IR_ULOAD) { | 474 | } else if (ir->o == IR_ALOAD || ir->o == IR_HLOAD || ir->o == IR_ULOAD) { |
475 | if (noconflict(as, ref, ir->o + IRDELTA_L2S, 0) && | 475 | if (noconflict(as, ref, ir->o + IRDELTA_L2S, 0) && |
476 | noconflict(as, ref, IR_CALLS, 0) && /* Don't cross table.clear. */ | ||
476 | !(LJ_GC64 && irt_isaddr(ir->t))) { | 477 | !(LJ_GC64 && irt_isaddr(ir->t))) { |
477 | asm_fuseahuref(as, ir->op1, xallow); | 478 | asm_fuseahuref(as, ir->op1, xallow); |
478 | return RID_MRM; | 479 | return RID_MRM; |