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.
This commit is contained in:
@@ -234,10 +234,10 @@ static void asm_fusefref(ASMState *as, IRIns *ir, RegSet allow)
|
||||
as->mrm.idx = RID_NONE;
|
||||
if (ir->op1 == REF_NIL) {
|
||||
#if LJ_GC64
|
||||
as->mrm.ofs = (int32_t)ir->op2 - GG_OFS(dispatch);
|
||||
as->mrm.ofs = (int32_t)(ir->op2 << 2) - GG_OFS(dispatch);
|
||||
as->mrm.base = RID_DISPATCH;
|
||||
#else
|
||||
as->mrm.ofs = (int32_t)ir->op2 + ptr2addr(J2GG(as->J));
|
||||
as->mrm.ofs = (int32_t)(ir->op2 << 2) + ptr2addr(J2GG(as->J));
|
||||
as->mrm.base = RID_NONE;
|
||||
#endif
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user