|
@@ -145,10 +145,12 @@ TRef lj_ir_call(jit_State *J, IRCallID id, ...)
|
|
|
return emitir(CCI_OPTYPE(ci), tr, id);
|
|
|
}
|
|
|
|
|
|
-/* Load field of type t from GG_State + offset. */
|
|
|
+/* Load field of type t from GG_State + offset. Must be 32 bit aligned. */
|
|
|
LJ_FUNC TRef lj_ir_ggfload(jit_State *J, IRType t, uintptr_t ofs)
|
|
|
{
|
|
|
- lua_assert(ofs >= IRFL__MAX && ofs < REF_BIAS);
|
|
|
+ lua_assert((ofs & 3) == 0);
|
|
|
+ ofs >>= 2;
|
|
|
+ lua_assert(ofs >= IRFL__MAX && ofs <= 0x3ff); /* 10 bit FOLD key limit. */
|
|
|
lj_ir_set(J, IRT(IR_FLOAD, t), REF_NIL, ofs);
|
|
|
return lj_opt_fold(J);
|
|
|
}
|