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

@@ -12,6 +12,7 @@
#include "lj_err.h"
#include "lj_buf.h"
#include "lj_dispatch.h"
#include "lj_ir.h"
#include "lj_jit.h"
#include "lj_ircall.h"
@@ -448,6 +449,11 @@ static void split_ir(jit_State *J)
case IR_STRTO:
hi = split_emit(J, IRT(IR_HIOP, IRT_SOFTFP), nref, nref);
break;
case IR_FLOAD:
lua_assert(ir->op1 == REF_NIL);
hi = lj_ir_kint(J, *(int32_t*)((char*)J2GG(J) + ir->op2 + LJ_LE*4));
nir->op2 += LJ_BE*4;
break;
case IR_XLOAD: {
IRIns inslo = *nir; /* Save/undo the emit of the lo XLOAD. */
J->cur.nins--;