mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-08 07:34:07 +00:00
Rename IRT_PTR to IRT_P32.
This commit is contained in:
parent
26830d070d
commit
6a7605ec85
@ -161,7 +161,7 @@ static void LJ_FASTCALL recff_setmetatable(jit_State *J, RecordFFData *rd)
|
|||||||
ix.tab = tr;
|
ix.tab = tr;
|
||||||
copyTV(J->L, &ix.tabv, &rd->argv[0]);
|
copyTV(J->L, &ix.tabv, &rd->argv[0]);
|
||||||
lj_record_mm_lookup(J, &ix, MM_metatable); /* Guard for no __metatable. */
|
lj_record_mm_lookup(J, &ix, MM_metatable); /* Guard for no __metatable. */
|
||||||
fref = emitir(IRT(IR_FREF, IRT_PTR), tr, IRFL_TAB_META);
|
fref = emitir(IRT(IR_FREF, IRT_P32), tr, IRFL_TAB_META);
|
||||||
mtref = tref_isnil(mt) ? lj_ir_knull(J, IRT_TAB) : mt;
|
mtref = tref_isnil(mt) ? lj_ir_knull(J, IRT_TAB) : mt;
|
||||||
emitir(IRT(IR_FSTORE, IRT_TAB), fref, mtref);
|
emitir(IRT(IR_FSTORE, IRT_TAB), fref, mtref);
|
||||||
if (!tref_isnil(mt))
|
if (!tref_isnil(mt))
|
||||||
@ -214,7 +214,7 @@ int32_t lj_ffrecord_select_mode(jit_State *J, TRef tr, TValue *tv)
|
|||||||
if (strV(tv)->len == 1) {
|
if (strV(tv)->len == 1) {
|
||||||
emitir(IRT(IR_EQ, IRT_STR), tr, lj_ir_kstr(J, strV(tv)));
|
emitir(IRT(IR_EQ, IRT_STR), tr, lj_ir_kstr(J, strV(tv)));
|
||||||
} else {
|
} else {
|
||||||
TRef trptr = emitir(IRT(IR_STRREF, IRT_PTR), tr, 0);
|
TRef trptr = emitir(IRT(IR_STRREF, IRT_P32), tr, 0);
|
||||||
TRef trchar = emitir(IRT(IR_XLOAD, IRT_U8), trptr, IRXLOAD_READONLY);
|
TRef trchar = emitir(IRT(IR_XLOAD, IRT_U8), trptr, IRXLOAD_READONLY);
|
||||||
emitir(IRT(IR_EQ, IRT_INT), trchar, lj_ir_kint(J, '#'));
|
emitir(IRT(IR_EQ, IRT_INT), trchar, lj_ir_kint(J, '#'));
|
||||||
}
|
}
|
||||||
@ -626,7 +626,7 @@ static void LJ_FASTCALL recff_string_range(jit_State *J, RecordFFData *rd)
|
|||||||
/* Also handle empty range here, to avoid extra traces. */
|
/* Also handle empty range here, to avoid extra traces. */
|
||||||
TRef trptr, trslen = emitir(IRTI(IR_SUB), trend, trstart);
|
TRef trptr, trslen = emitir(IRTI(IR_SUB), trend, trstart);
|
||||||
emitir(IRTGI(IR_GE), trslen, tr0);
|
emitir(IRTGI(IR_GE), trslen, tr0);
|
||||||
trptr = emitir(IRT(IR_STRREF, IRT_PTR), trstr, trstart);
|
trptr = emitir(IRT(IR_STRREF, IRT_P32), trstr, trstart);
|
||||||
J->base[0] = emitir(IRT(IR_SNEW, IRT_STR), trptr, trslen);
|
J->base[0] = emitir(IRT(IR_SNEW, IRT_STR), trptr, trslen);
|
||||||
} else { /* Range underflow: return empty string. */
|
} else { /* Range underflow: return empty string. */
|
||||||
emitir(IRTGI(IR_LT), trend, trstart);
|
emitir(IRTGI(IR_LT), trend, trstart);
|
||||||
@ -642,7 +642,7 @@ static void LJ_FASTCALL recff_string_range(jit_State *J, RecordFFData *rd)
|
|||||||
rd->nres = len;
|
rd->nres = len;
|
||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
TRef tmp = emitir(IRTI(IR_ADD), trstart, lj_ir_kint(J, (int32_t)i));
|
TRef tmp = emitir(IRTI(IR_ADD), trstart, lj_ir_kint(J, (int32_t)i));
|
||||||
tmp = emitir(IRT(IR_STRREF, IRT_PTR), trstr, tmp);
|
tmp = emitir(IRT(IR_STRREF, IRT_P32), trstr, tmp);
|
||||||
J->base[i] = emitir(IRT(IR_XLOAD, IRT_U8), tmp, IRXLOAD_READONLY);
|
J->base[i] = emitir(IRT(IR_XLOAD, IRT_U8), tmp, IRXLOAD_READONLY);
|
||||||
}
|
}
|
||||||
} else { /* Empty range or range underflow: return no results. */
|
} else { /* Empty range or range underflow: return no results. */
|
||||||
@ -746,7 +746,7 @@ static void LJ_FASTCALL recff_io_write(jit_State *J, RecordFFData *rd)
|
|||||||
ptrdiff_t i = rd->data == 0 ? 1 : 0;
|
ptrdiff_t i = rd->data == 0 ? 1 : 0;
|
||||||
for (; J->base[i]; i++) {
|
for (; J->base[i]; i++) {
|
||||||
TRef str = lj_ir_tostr(J, J->base[i]);
|
TRef str = lj_ir_tostr(J, J->base[i]);
|
||||||
TRef buf = emitir(IRT(IR_STRREF, IRT_PTR), str, zero);
|
TRef buf = emitir(IRT(IR_STRREF, IRT_P32), str, zero);
|
||||||
TRef len = emitir(IRTI(IR_FLOAD), str, IRFL_STR_LEN);
|
TRef len = emitir(IRTI(IR_FLOAD), str, IRFL_STR_LEN);
|
||||||
if (tref_isk(len) && IR(tref_ref(len))->i == 1) {
|
if (tref_isk(len) && IR(tref_ref(len))->i == 1) {
|
||||||
TRef tr = emitir(IRT(IR_XLOAD, IRT_U8), buf, IRXLOAD_READONLY);
|
TRef tr = emitir(IRT(IR_XLOAD, IRT_U8), buf, IRXLOAD_READONLY);
|
||||||
|
@ -311,12 +311,12 @@ TRef lj_ir_kptr(jit_State *J, void *ptr)
|
|||||||
ref = ir_nextk(J);
|
ref = ir_nextk(J);
|
||||||
ir = IR(ref);
|
ir = IR(ref);
|
||||||
setmref(ir->ptr, ptr);
|
setmref(ir->ptr, ptr);
|
||||||
ir->t.irt = IRT_PTR;
|
ir->t.irt = IRT_P32;
|
||||||
ir->o = IR_KPTR;
|
ir->o = IR_KPTR;
|
||||||
ir->prev = J->chain[IR_KPTR];
|
ir->prev = J->chain[IR_KPTR];
|
||||||
J->chain[IR_KPTR] = (IRRef1)ref;
|
J->chain[IR_KPTR] = (IRRef1)ref;
|
||||||
found:
|
found:
|
||||||
return TREF(ref, IRT_PTR);
|
return TREF(ref, IRT_P32);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Intern typed NULL constant. */
|
/* Intern typed NULL constant. */
|
||||||
@ -352,12 +352,12 @@ TRef lj_ir_kslot(jit_State *J, TRef key, IRRef slot)
|
|||||||
ref = ir_nextk(J);
|
ref = ir_nextk(J);
|
||||||
ir = IR(ref);
|
ir = IR(ref);
|
||||||
ir->op12 = op12;
|
ir->op12 = op12;
|
||||||
ir->t.irt = IRT_PTR;
|
ir->t.irt = IRT_P32;
|
||||||
ir->o = IR_KSLOT;
|
ir->o = IR_KSLOT;
|
||||||
ir->prev = J->chain[IR_KSLOT];
|
ir->prev = J->chain[IR_KSLOT];
|
||||||
J->chain[IR_KSLOT] = (IRRef1)ref;
|
J->chain[IR_KSLOT] = (IRRef1)ref;
|
||||||
found:
|
found:
|
||||||
return TREF(ref, IRT_PTR);
|
return TREF(ref, IRT_P32);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -- Access to IR constants ---------------------------------------------- */
|
/* -- Access to IR constants ---------------------------------------------- */
|
||||||
|
@ -243,7 +243,7 @@ typedef struct CCallInfo {
|
|||||||
_(lj_str_fromnum, 2, FN, STR, CCI_L) \
|
_(lj_str_fromnum, 2, FN, STR, CCI_L) \
|
||||||
_(lj_tab_new1, 2, FS, TAB, CCI_L) \
|
_(lj_tab_new1, 2, FS, TAB, CCI_L) \
|
||||||
_(lj_tab_dup, 2, FS, TAB, CCI_L) \
|
_(lj_tab_dup, 2, FS, TAB, CCI_L) \
|
||||||
_(lj_tab_newkey, 3, S, PTR, CCI_L) \
|
_(lj_tab_newkey, 3, S, P32, CCI_L) \
|
||||||
_(lj_tab_len, 1, FL, INT, 0) \
|
_(lj_tab_len, 1, FL, INT, 0) \
|
||||||
_(lj_gc_step_jit, 2, FS, NIL, CCI_L) \
|
_(lj_gc_step_jit, 2, FS, NIL, CCI_L) \
|
||||||
_(lj_gc_barrieruv, 2, FS, NIL, 0) \
|
_(lj_gc_barrieruv, 2, FS, NIL, 0) \
|
||||||
@ -311,7 +311,7 @@ typedef enum {
|
|||||||
IRT_LIGHTUD,
|
IRT_LIGHTUD,
|
||||||
/* GCobj types are from here ... */
|
/* GCobj types are from here ... */
|
||||||
IRT_STR,
|
IRT_STR,
|
||||||
IRT_PTR, /* IRT_PTR never escapes the IR (map of LJ_TUPVAL). */
|
IRT_P32, /* IRT_P32 never escapes the IR (map of LJ_TUPVAL). */
|
||||||
IRT_THREAD,
|
IRT_THREAD,
|
||||||
IRT_PROTO,
|
IRT_PROTO,
|
||||||
IRT_FUNC,
|
IRT_FUNC,
|
||||||
|
@ -326,7 +326,7 @@ LJFOLDF(kfold_strref_snew)
|
|||||||
PHIBARRIER(ir);
|
PHIBARRIER(ir);
|
||||||
fins->op2 = emitir(IRTI(IR_ADD), ir->op2, fins->op2); /* Clobbers fins! */
|
fins->op2 = emitir(IRTI(IR_ADD), ir->op2, fins->op2); /* Clobbers fins! */
|
||||||
fins->op1 = str;
|
fins->op1 = str;
|
||||||
fins->ot = IRT(IR_STRREF, IRT_PTR);
|
fins->ot = IRT(IR_STRREF, IRT_P32);
|
||||||
return RETRYFOLD;
|
return RETRYFOLD;
|
||||||
}
|
}
|
||||||
return NEXTFOLD;
|
return NEXTFOLD;
|
||||||
|
@ -594,7 +594,7 @@ void lj_record_ret(jit_State *J, BCReg rbase, ptrdiff_t gotresults)
|
|||||||
} else { /* Return to lower frame. Guard for the target we return to. */
|
} else { /* Return to lower frame. Guard for the target we return to. */
|
||||||
TRef trpt = lj_ir_kgc(J, obj2gco(pt), IRT_PROTO);
|
TRef trpt = lj_ir_kgc(J, obj2gco(pt), IRT_PROTO);
|
||||||
TRef trpc = lj_ir_kptr(J, (void *)frame_pc(frame));
|
TRef trpc = lj_ir_kptr(J, (void *)frame_pc(frame));
|
||||||
emitir(IRTG(IR_RETF, IRT_PTR), trpt, trpc);
|
emitir(IRTG(IR_RETF, IRT_P32), trpt, trpc);
|
||||||
J->retdepth++;
|
J->retdepth++;
|
||||||
J->needsnap = 1;
|
J->needsnap = 1;
|
||||||
lua_assert(J->baseslot == 1);
|
lua_assert(J->baseslot == 1);
|
||||||
@ -826,12 +826,12 @@ static void rec_idx_abc(jit_State *J, TRef asizeref, TRef ikey, uint32_t asize)
|
|||||||
/* Runtime value for stop of loop is within bounds? */
|
/* Runtime value for stop of loop is within bounds? */
|
||||||
if ((int64_t)stop + ofs < (int64_t)asize) {
|
if ((int64_t)stop + ofs < (int64_t)asize) {
|
||||||
/* Emit invariant bounds check for stop. */
|
/* Emit invariant bounds check for stop. */
|
||||||
emitir(IRTG(IR_ABC, IRT_PTR), asizeref, ofs == 0 ? J->scev.stop :
|
emitir(IRTG(IR_ABC, IRT_P32), asizeref, ofs == 0 ? J->scev.stop :
|
||||||
emitir(IRTI(IR_ADD), J->scev.stop, ofsref));
|
emitir(IRTI(IR_ADD), J->scev.stop, ofsref));
|
||||||
/* Emit invariant bounds check for start, if not const or negative. */
|
/* Emit invariant bounds check for start, if not const or negative. */
|
||||||
if (!(J->scev.dir && J->scev.start &&
|
if (!(J->scev.dir && J->scev.start &&
|
||||||
(int64_t)IR(J->scev.start)->i + ofs >= 0))
|
(int64_t)IR(J->scev.start)->i + ofs >= 0))
|
||||||
emitir(IRTG(IR_ABC, IRT_PTR), asizeref, ikey);
|
emitir(IRTG(IR_ABC, IRT_P32), asizeref, ikey);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -861,8 +861,8 @@ static TRef rec_idx_key(jit_State *J, RecordIndex *ix)
|
|||||||
if ((MSize)k < t->asize) { /* Currently an array key? */
|
if ((MSize)k < t->asize) { /* Currently an array key? */
|
||||||
TRef arrayref;
|
TRef arrayref;
|
||||||
rec_idx_abc(J, asizeref, ikey, t->asize);
|
rec_idx_abc(J, asizeref, ikey, t->asize);
|
||||||
arrayref = emitir(IRT(IR_FLOAD, IRT_PTR), ix->tab, IRFL_TAB_ARRAY);
|
arrayref = emitir(IRT(IR_FLOAD, IRT_P32), ix->tab, IRFL_TAB_ARRAY);
|
||||||
return emitir(IRT(IR_AREF, IRT_PTR), arrayref, ikey);
|
return emitir(IRT(IR_AREF, IRT_P32), arrayref, ikey);
|
||||||
} else { /* Currently not in array (may be an array extension)? */
|
} else { /* Currently not in array (may be an array extension)? */
|
||||||
emitir(IRTGI(IR_ULE), asizeref, ikey); /* Inv. bounds check. */
|
emitir(IRTGI(IR_ULE), asizeref, ikey); /* Inv. bounds check. */
|
||||||
if (k == 0 && tref_isk(key))
|
if (k == 0 && tref_isk(key))
|
||||||
@ -894,13 +894,13 @@ static TRef rec_idx_key(jit_State *J, RecordIndex *ix)
|
|||||||
TRef node, kslot;
|
TRef node, kslot;
|
||||||
TRef hm = emitir(IRTI(IR_FLOAD), ix->tab, IRFL_TAB_HMASK);
|
TRef hm = emitir(IRTI(IR_FLOAD), ix->tab, IRFL_TAB_HMASK);
|
||||||
emitir(IRTGI(IR_EQ), hm, lj_ir_kint(J, (int32_t)t->hmask));
|
emitir(IRTGI(IR_EQ), hm, lj_ir_kint(J, (int32_t)t->hmask));
|
||||||
node = emitir(IRT(IR_FLOAD, IRT_PTR), ix->tab, IRFL_TAB_NODE);
|
node = emitir(IRT(IR_FLOAD, IRT_P32), ix->tab, IRFL_TAB_NODE);
|
||||||
kslot = lj_ir_kslot(J, key, hslot / sizeof(Node));
|
kslot = lj_ir_kslot(J, key, hslot / sizeof(Node));
|
||||||
return emitir(IRTG(IR_HREFK, IRT_PTR), node, kslot);
|
return emitir(IRTG(IR_HREFK, IRT_P32), node, kslot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Fall back to a regular hash lookup. */
|
/* Fall back to a regular hash lookup. */
|
||||||
return emitir(IRT(IR_HREF, IRT_PTR), ix->tab, key);
|
return emitir(IRT(IR_HREF, IRT_P32), ix->tab, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Determine whether a key is NOT one of the fast metamethod names. */
|
/* Determine whether a key is NOT one of the fast metamethod names. */
|
||||||
@ -979,7 +979,7 @@ TRef lj_record_idx(jit_State *J, RecordIndex *ix)
|
|||||||
IRType t = itype2irt(oldv);
|
IRType t = itype2irt(oldv);
|
||||||
TRef res;
|
TRef res;
|
||||||
if (oldv == niltvg(J2G(J))) {
|
if (oldv == niltvg(J2G(J))) {
|
||||||
emitir(IRTG(IR_EQ, IRT_PTR), xref, lj_ir_kptr(J, niltvg(J2G(J))));
|
emitir(IRTG(IR_EQ, IRT_P32), xref, lj_ir_kptr(J, niltvg(J2G(J))));
|
||||||
res = TREF_NIL;
|
res = TREF_NIL;
|
||||||
} else {
|
} else {
|
||||||
res = emitir(IRTG(loadop, t), xref, 0);
|
res = emitir(IRTG(loadop, t), xref, 0);
|
||||||
@ -1001,7 +1001,7 @@ TRef lj_record_idx(jit_State *J, RecordIndex *ix)
|
|||||||
if (hasmm)
|
if (hasmm)
|
||||||
emitir(IRTG(loadop, IRT_NIL), xref, 0); /* Guard for nil value. */
|
emitir(IRTG(loadop, IRT_NIL), xref, 0); /* Guard for nil value. */
|
||||||
else if (xrefop == IR_HREF)
|
else if (xrefop == IR_HREF)
|
||||||
emitir(IRTG(oldv == niltvg(J2G(J)) ? IR_EQ : IR_NE, IRT_PTR),
|
emitir(IRTG(oldv == niltvg(J2G(J)) ? IR_EQ : IR_NE, IRT_P32),
|
||||||
xref, lj_ir_kptr(J, niltvg(J2G(J))));
|
xref, lj_ir_kptr(J, niltvg(J2G(J))));
|
||||||
if (ix->idxchain && lj_record_mm_lookup(J, ix, MM_newindex)) {
|
if (ix->idxchain && lj_record_mm_lookup(J, ix, MM_newindex)) {
|
||||||
lua_assert(hasmm);
|
lua_assert(hasmm);
|
||||||
@ -1012,13 +1012,13 @@ TRef lj_record_idx(jit_State *J, RecordIndex *ix)
|
|||||||
TRef key = ix->key;
|
TRef key = ix->key;
|
||||||
if (tref_isinteger(key)) /* NEWREF needs a TValue as a key. */
|
if (tref_isinteger(key)) /* NEWREF needs a TValue as a key. */
|
||||||
key = emitir(IRTN(IR_TONUM), key, 0);
|
key = emitir(IRTN(IR_TONUM), key, 0);
|
||||||
xref = emitir(IRT(IR_NEWREF, IRT_PTR), ix->tab, key);
|
xref = emitir(IRT(IR_NEWREF, IRT_P32), ix->tab, key);
|
||||||
keybarrier = 0; /* NEWREF already takes care of the key barrier. */
|
keybarrier = 0; /* NEWREF already takes care of the key barrier. */
|
||||||
}
|
}
|
||||||
} else if (!lj_opt_fwd_wasnonnil(J, loadop, tref_ref(xref))) {
|
} else if (!lj_opt_fwd_wasnonnil(J, loadop, tref_ref(xref))) {
|
||||||
/* Cannot derive that the previous value was non-nil, must do checks. */
|
/* Cannot derive that the previous value was non-nil, must do checks. */
|
||||||
if (xrefop == IR_HREF) /* Guard against store to niltv. */
|
if (xrefop == IR_HREF) /* Guard against store to niltv. */
|
||||||
emitir(IRTG(IR_NE, IRT_PTR), xref, lj_ir_kptr(J, niltvg(J2G(J))));
|
emitir(IRTG(IR_NE, IRT_P32), xref, lj_ir_kptr(J, niltvg(J2G(J))));
|
||||||
if (ix->idxchain) { /* Metamethod lookup required? */
|
if (ix->idxchain) { /* Metamethod lookup required? */
|
||||||
/* A check for NULL metatable is cheaper (hoistable) than a load. */
|
/* A check for NULL metatable is cheaper (hoistable) than a load. */
|
||||||
if (!mt) {
|
if (!mt) {
|
||||||
@ -1039,7 +1039,7 @@ TRef lj_record_idx(jit_State *J, RecordIndex *ix)
|
|||||||
emitir(IRT(IR_TBAR, IRT_NIL), ix->tab, 0);
|
emitir(IRT(IR_TBAR, IRT_NIL), ix->tab, 0);
|
||||||
/* Invalidate neg. metamethod cache for stores with certain string keys. */
|
/* Invalidate neg. metamethod cache for stores with certain string keys. */
|
||||||
if (!nommstr(J, ix->key)) {
|
if (!nommstr(J, ix->key)) {
|
||||||
TRef fref = emitir(IRT(IR_FREF, IRT_PTR), ix->tab, IRFL_TAB_NOMM);
|
TRef fref = emitir(IRT(IR_FREF, IRT_P32), ix->tab, IRFL_TAB_NOMM);
|
||||||
emitir(IRT(IR_FSTORE, IRT_U8), fref, lj_ir_kint(J, 0));
|
emitir(IRT(IR_FSTORE, IRT_U8), fref, lj_ir_kint(J, 0));
|
||||||
}
|
}
|
||||||
J->needsnap = 1;
|
J->needsnap = 1;
|
||||||
@ -1075,10 +1075,10 @@ static TRef rec_upvalue(jit_State *J, uint32_t uv, TRef val)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uref = tref_ref(emitir(IRTG(IR_UREFO, IRT_PTR), fn, uv));
|
uref = tref_ref(emitir(IRTG(IR_UREFO, IRT_P32), fn, uv));
|
||||||
} else {
|
} else {
|
||||||
needbarrier = 1;
|
needbarrier = 1;
|
||||||
uref = tref_ref(emitir(IRTG(IR_UREFC, IRT_PTR), fn, uv));
|
uref = tref_ref(emitir(IRTG(IR_UREFC, IRT_P32), fn, uv));
|
||||||
}
|
}
|
||||||
if (val == 0) { /* Upvalue load */
|
if (val == 0) { /* Upvalue load */
|
||||||
IRType t = itype2irt(uvval(uvp));
|
IRType t = itype2irt(uvval(uvp));
|
||||||
@ -1218,10 +1218,10 @@ static void rec_varg(jit_State *J, BCReg dst, ptrdiff_t nresults)
|
|||||||
else
|
else
|
||||||
emitir(IRTGI(IR_EQ), fr, lj_ir_kint(J, frame_ftsz(J->L->base-1)));
|
emitir(IRTGI(IR_EQ), fr, lj_ir_kint(J, frame_ftsz(J->L->base-1)));
|
||||||
vbase = emitir(IRTI(IR_SUB), REF_BASE, fr);
|
vbase = emitir(IRTI(IR_SUB), REF_BASE, fr);
|
||||||
vbase = emitir(IRT(IR_ADD, IRT_PTR), vbase, lj_ir_kint(J, frofs-8));
|
vbase = emitir(IRT(IR_ADD, IRT_P32), vbase, lj_ir_kint(J, frofs-8));
|
||||||
for (i = 0; i < nload; i++) {
|
for (i = 0; i < nload; i++) {
|
||||||
IRType t = itype2irt(&J->L->base[i-1-nvararg]);
|
IRType t = itype2irt(&J->L->base[i-1-nvararg]);
|
||||||
TRef aref = emitir(IRT(IR_AREF, IRT_PTR),
|
TRef aref = emitir(IRT(IR_AREF, IRT_P32),
|
||||||
vbase, lj_ir_kint(J, (int32_t)i));
|
vbase, lj_ir_kint(J, (int32_t)i));
|
||||||
TRef tr = emitir(IRTG(IR_VLOAD, t), aref, 0);
|
TRef tr = emitir(IRTG(IR_VLOAD, t), aref, 0);
|
||||||
if (irtype_ispri(t)) tr = TREF_PRI(t); /* Canonicalize primitives. */
|
if (irtype_ispri(t)) tr = TREF_PRI(t); /* Canonicalize primitives. */
|
||||||
@ -1268,9 +1268,9 @@ static void rec_varg(jit_State *J, BCReg dst, ptrdiff_t nresults)
|
|||||||
if (idx != 0 && idx <= nvararg) {
|
if (idx != 0 && idx <= nvararg) {
|
||||||
IRType t;
|
IRType t;
|
||||||
TRef aref, vbase = emitir(IRTI(IR_SUB), REF_BASE, fr);
|
TRef aref, vbase = emitir(IRTI(IR_SUB), REF_BASE, fr);
|
||||||
vbase = emitir(IRT(IR_ADD, IRT_PTR), vbase, lj_ir_kint(J, frofs-8));
|
vbase = emitir(IRT(IR_ADD, IRT_P32), vbase, lj_ir_kint(J, frofs-8));
|
||||||
t = itype2irt(&J->L->base[idx-2-nvararg]);
|
t = itype2irt(&J->L->base[idx-2-nvararg]);
|
||||||
aref = emitir(IRT(IR_AREF, IRT_PTR), vbase, tridx);
|
aref = emitir(IRT(IR_AREF, IRT_P32), vbase, tridx);
|
||||||
tr = emitir(IRTG(IR_VLOAD, t), aref, 0);
|
tr = emitir(IRTG(IR_VLOAD, t), aref, 0);
|
||||||
if (irtype_ispri(t)) tr = TREF_PRI(t); /* Canonicalize primitives. */
|
if (irtype_ispri(t)) tr = TREF_PRI(t); /* Canonicalize primitives. */
|
||||||
}
|
}
|
||||||
@ -1913,7 +1913,7 @@ void lj_record_setup(jit_State *J)
|
|||||||
J->bc_extent = ~(MSize)0;
|
J->bc_extent = ~(MSize)0;
|
||||||
|
|
||||||
/* Emit instructions for fixed references. Also triggers initial IR alloc. */
|
/* Emit instructions for fixed references. Also triggers initial IR alloc. */
|
||||||
emitir_raw(IRT(IR_BASE, IRT_PTR), J->parent, J->exitno);
|
emitir_raw(IRT(IR_BASE, IRT_P32), J->parent, J->exitno);
|
||||||
for (i = 0; i <= 2; i++) {
|
for (i = 0; i <= 2; i++) {
|
||||||
IRIns *ir = IR(REF_NIL-i);
|
IRIns *ir = IR(REF_NIL-i);
|
||||||
ir->i = 0;
|
ir->i = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user