aboutsummaryrefslogtreecommitdiff
path: root/src/lj_asm_x86.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-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. */