aboutsummaryrefslogtreecommitdiff
path: root/src/lj_asm_x86.h
diff options
context:
space:
mode:
authorMike Pall <mike>2023-09-21 03:46:33 +0200
committerMike Pall <mike>2023-09-21 03:46:33 +0200
commitb8919781d4717d8c3171b0002d230e03304d8174 (patch)
treeda31753f1fad2e7ae1abc46b86fb8cc18aa5d770 /src/lj_asm_x86.h
parent91592899275cbb540ca67bbf95b41a2200e4fdbd (diff)
downloadluajit-b8919781d4717d8c3171b0002d230e03304d8174.tar.gz
luajit-b8919781d4717d8c3171b0002d230e03304d8174.tar.bz2
luajit-b8919781d4717d8c3171b0002d230e03304d8174.zip
Consistently use 64 bit constants for 64 bit IR instructions.
Thanks to Peter Cawley. #1084
Diffstat (limited to 'src/lj_asm_x86.h')
-rw-r--r--src/lj_asm_x86.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_asm_x86.h b/src/lj_asm_x86.h
index 9f779bf5..c92de3d8 100644
--- a/src/lj_asm_x86.h
+++ b/src/lj_asm_x86.h
@@ -140,7 +140,8 @@ static IRRef asm_fuseabase(ASMState *as, IRRef ref)
140 } 140 }
141 } else if (irb->o == IR_ADD && irref_isk(irb->op2)) { 141 } else if (irb->o == IR_ADD && irref_isk(irb->op2)) {
142 /* Fuse base offset (vararg load). */ 142 /* Fuse base offset (vararg load). */
143 as->mrm.ofs = IR(irb->op2)->i; 143 IRIns *irk = IR(irb->op2);
144 as->mrm.ofs = irk->o == IR_KINT ? irk->i : (int32_t)ir_kint64(irk)->u64;
144 return irb->op1; 145 return irb->op1;
145 } 146 }
146 return ref; /* Otherwise use the given array base. */ 147 return ref; /* Otherwise use the given array base. */