Add IR_FLOAD with REF_NIL for field loads from GG_State.

Contributed by Peter Cawley.
This commit is contained in:
Mike Pall
2016-05-21 00:30:36 +02:00
parent cfa188f134
commit 786dbb2ebd
8 changed files with 72 additions and 31 deletions

View File

@@ -145,6 +145,14 @@ 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. */
LJ_FUNC TRef lj_ir_ggfload(jit_State *J, IRType t, uintptr_t ofs)
{
lua_assert(ofs >= IRFL__MAX && ofs < REF_BIAS);
lj_ir_set(J, IRT(IR_FLOAD, t), REF_NIL, ofs);
return lj_opt_fold(J);
}
/* -- Interning of constants ---------------------------------------------- */
/*