aboutsummaryrefslogtreecommitdiff
path: root/src/lj_asm_x86.h
diff options
context:
space:
mode:
authorMike Pall <mike>2016-11-19 19:53:46 +0100
committerMike Pall <mike>2016-11-19 19:53:46 +0100
commite577db52c543303543c9e30e8ebe0c244e1b85c8 (patch)
tree745f5c5e39aa83f66f2ceb3e3145f44f551a197c /src/lj_asm_x86.h
parent5400c1e42469cdb3cb5df691baa877b762b27704 (diff)
downloadluajit-e577db52c543303543c9e30e8ebe0c244e1b85c8.tar.gz
luajit-e577db52c543303543c9e30e8ebe0c244e1b85c8.tar.bz2
luajit-e577db52c543303543c9e30e8ebe0c244e1b85c8.zip
Increase range of GG_State loads via IR_FLOAD with REF_NIL.
Require 32 bit alignment and store offset/4 instead. Otherwise this can overflow the 10 bit limit for the FOLD op2 key.
Diffstat (limited to 'src/lj_asm_x86.h')
-rw-r--r--src/lj_asm_x86.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_asm_x86.h b/src/lj_asm_x86.h
index 1b94371e..381eac9c 100644
--- a/src/lj_asm_x86.h
+++ b/src/lj_asm_x86.h
@@ -234,10 +234,10 @@ static void asm_fusefref(ASMState *as, IRIns *ir, RegSet allow)
234 as->mrm.idx = RID_NONE; 234 as->mrm.idx = RID_NONE;
235 if (ir->op1 == REF_NIL) { 235 if (ir->op1 == REF_NIL) {
236#if LJ_GC64 236#if LJ_GC64
237 as->mrm.ofs = (int32_t)ir->op2 - GG_OFS(dispatch); 237 as->mrm.ofs = (int32_t)(ir->op2 << 2) - GG_OFS(dispatch);
238 as->mrm.base = RID_DISPATCH; 238 as->mrm.base = RID_DISPATCH;
239#else 239#else
240 as->mrm.ofs = (int32_t)ir->op2 + ptr2addr(J2GG(as->J)); 240 as->mrm.ofs = (int32_t)(ir->op2 << 2) + ptr2addr(J2GG(as->J));
241 as->mrm.base = RID_NONE; 241 as->mrm.base = RID_NONE;
242#endif 242#endif
243 return; 243 return;