diff options
author | Mike Pall <mike> | 2010-12-05 18:59:34 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2010-12-05 18:59:34 +0100 |
commit | 6a7605ec85a6e5f91fc539a9e5c18659d73f3530 (patch) | |
tree | 1d2a8db0e2f1e6dcca30a0bcbf2b91bf88154600 /src | |
parent | 26830d070df51c72819d1e5515ff5cce0f1132fa (diff) | |
download | luajit-6a7605ec85a6e5f91fc539a9e5c18659d73f3530.tar.gz luajit-6a7605ec85a6e5f91fc539a9e5c18659d73f3530.tar.bz2 luajit-6a7605ec85a6e5f91fc539a9e5c18659d73f3530.zip |
Rename IRT_PTR to IRT_P32.
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_ffrecord.c | 10 | ||||
-rw-r--r-- | src/lj_ir.c | 8 | ||||
-rw-r--r-- | src/lj_ir.h | 4 | ||||
-rw-r--r-- | src/lj_opt_fold.c | 2 | ||||
-rw-r--r-- | src/lj_record.c | 40 |
5 files changed, 32 insertions, 32 deletions
diff --git a/src/lj_ffrecord.c b/src/lj_ffrecord.c index 0c8a41cd..d695b8bf 100644 --- a/src/lj_ffrecord.c +++ b/src/lj_ffrecord.c | |||
@@ -161,7 +161,7 @@ static void LJ_FASTCALL recff_setmetatable(jit_State *J, RecordFFData *rd) | |||
161 | ix.tab = tr; | 161 | ix.tab = tr; |
162 | copyTV(J->L, &ix.tabv, &rd->argv[0]); | 162 | copyTV(J->L, &ix.tabv, &rd->argv[0]); |
163 | lj_record_mm_lookup(J, &ix, MM_metatable); /* Guard for no __metatable. */ | 163 | lj_record_mm_lookup(J, &ix, MM_metatable); /* Guard for no __metatable. */ |
164 | fref = emitir(IRT(IR_FREF, IRT_PTR), tr, IRFL_TAB_META); | 164 | fref = emitir(IRT(IR_FREF, IRT_P32), tr, IRFL_TAB_META); |
165 | mtref = tref_isnil(mt) ? lj_ir_knull(J, IRT_TAB) : mt; | 165 | mtref = tref_isnil(mt) ? lj_ir_knull(J, IRT_TAB) : mt; |
166 | emitir(IRT(IR_FSTORE, IRT_TAB), fref, mtref); | 166 | emitir(IRT(IR_FSTORE, IRT_TAB), fref, mtref); |
167 | if (!tref_isnil(mt)) | 167 | if (!tref_isnil(mt)) |
@@ -214,7 +214,7 @@ int32_t lj_ffrecord_select_mode(jit_State *J, TRef tr, TValue *tv) | |||
214 | if (strV(tv)->len == 1) { | 214 | if (strV(tv)->len == 1) { |
215 | emitir(IRT(IR_EQ, IRT_STR), tr, lj_ir_kstr(J, strV(tv))); | 215 | emitir(IRT(IR_EQ, IRT_STR), tr, lj_ir_kstr(J, strV(tv))); |
216 | } else { | 216 | } else { |
217 | TRef trptr = emitir(IRT(IR_STRREF, IRT_PTR), tr, 0); | 217 | TRef trptr = emitir(IRT(IR_STRREF, IRT_P32), tr, 0); |
218 | TRef trchar = emitir(IRT(IR_XLOAD, IRT_U8), trptr, IRXLOAD_READONLY); | 218 | TRef trchar = emitir(IRT(IR_XLOAD, IRT_U8), trptr, IRXLOAD_READONLY); |
219 | emitir(IRT(IR_EQ, IRT_INT), trchar, lj_ir_kint(J, '#')); | 219 | emitir(IRT(IR_EQ, IRT_INT), trchar, lj_ir_kint(J, '#')); |
220 | } | 220 | } |
@@ -626,7 +626,7 @@ static void LJ_FASTCALL recff_string_range(jit_State *J, RecordFFData *rd) | |||
626 | /* Also handle empty range here, to avoid extra traces. */ | 626 | /* Also handle empty range here, to avoid extra traces. */ |
627 | TRef trptr, trslen = emitir(IRTI(IR_SUB), trend, trstart); | 627 | TRef trptr, trslen = emitir(IRTI(IR_SUB), trend, trstart); |
628 | emitir(IRTGI(IR_GE), trslen, tr0); | 628 | emitir(IRTGI(IR_GE), trslen, tr0); |
629 | trptr = emitir(IRT(IR_STRREF, IRT_PTR), trstr, trstart); | 629 | trptr = emitir(IRT(IR_STRREF, IRT_P32), trstr, trstart); |
630 | J->base[0] = emitir(IRT(IR_SNEW, IRT_STR), trptr, trslen); | 630 | J->base[0] = emitir(IRT(IR_SNEW, IRT_STR), trptr, trslen); |
631 | } else { /* Range underflow: return empty string. */ | 631 | } else { /* Range underflow: return empty string. */ |
632 | emitir(IRTGI(IR_LT), trend, trstart); | 632 | emitir(IRTGI(IR_LT), trend, trstart); |
@@ -642,7 +642,7 @@ static void LJ_FASTCALL recff_string_range(jit_State *J, RecordFFData *rd) | |||
642 | rd->nres = len; | 642 | rd->nres = len; |
643 | for (i = 0; i < len; i++) { | 643 | for (i = 0; i < len; i++) { |
644 | TRef tmp = emitir(IRTI(IR_ADD), trstart, lj_ir_kint(J, (int32_t)i)); | 644 | TRef tmp = emitir(IRTI(IR_ADD), trstart, lj_ir_kint(J, (int32_t)i)); |
645 | tmp = emitir(IRT(IR_STRREF, IRT_PTR), trstr, tmp); | 645 | tmp = emitir(IRT(IR_STRREF, IRT_P32), trstr, tmp); |
646 | J->base[i] = emitir(IRT(IR_XLOAD, IRT_U8), tmp, IRXLOAD_READONLY); | 646 | J->base[i] = emitir(IRT(IR_XLOAD, IRT_U8), tmp, IRXLOAD_READONLY); |
647 | } | 647 | } |
648 | } else { /* Empty range or range underflow: return no results. */ | 648 | } 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) | |||
746 | ptrdiff_t i = rd->data == 0 ? 1 : 0; | 746 | ptrdiff_t i = rd->data == 0 ? 1 : 0; |
747 | for (; J->base[i]; i++) { | 747 | for (; J->base[i]; i++) { |
748 | TRef str = lj_ir_tostr(J, J->base[i]); | 748 | TRef str = lj_ir_tostr(J, J->base[i]); |
749 | TRef buf = emitir(IRT(IR_STRREF, IRT_PTR), str, zero); | 749 | TRef buf = emitir(IRT(IR_STRREF, IRT_P32), str, zero); |
750 | TRef len = emitir(IRTI(IR_FLOAD), str, IRFL_STR_LEN); | 750 | TRef len = emitir(IRTI(IR_FLOAD), str, IRFL_STR_LEN); |
751 | if (tref_isk(len) && IR(tref_ref(len))->i == 1) { | 751 | if (tref_isk(len) && IR(tref_ref(len))->i == 1) { |
752 | TRef tr = emitir(IRT(IR_XLOAD, IRT_U8), buf, IRXLOAD_READONLY); | 752 | TRef tr = emitir(IRT(IR_XLOAD, IRT_U8), buf, IRXLOAD_READONLY); |
diff --git a/src/lj_ir.c b/src/lj_ir.c index b1192a22..529c333b 100644 --- a/src/lj_ir.c +++ b/src/lj_ir.c | |||
@@ -311,12 +311,12 @@ TRef lj_ir_kptr(jit_State *J, void *ptr) | |||
311 | ref = ir_nextk(J); | 311 | ref = ir_nextk(J); |
312 | ir = IR(ref); | 312 | ir = IR(ref); |
313 | setmref(ir->ptr, ptr); | 313 | setmref(ir->ptr, ptr); |
314 | ir->t.irt = IRT_PTR; | 314 | ir->t.irt = IRT_P32; |
315 | ir->o = IR_KPTR; | 315 | ir->o = IR_KPTR; |
316 | ir->prev = J->chain[IR_KPTR]; | 316 | ir->prev = J->chain[IR_KPTR]; |
317 | J->chain[IR_KPTR] = (IRRef1)ref; | 317 | J->chain[IR_KPTR] = (IRRef1)ref; |
318 | found: | 318 | found: |
319 | return TREF(ref, IRT_PTR); | 319 | return TREF(ref, IRT_P32); |
320 | } | 320 | } |
321 | 321 | ||
322 | /* Intern typed NULL constant. */ | 322 | /* Intern typed NULL constant. */ |
@@ -352,12 +352,12 @@ TRef lj_ir_kslot(jit_State *J, TRef key, IRRef slot) | |||
352 | ref = ir_nextk(J); | 352 | ref = ir_nextk(J); |
353 | ir = IR(ref); | 353 | ir = IR(ref); |
354 | ir->op12 = op12; | 354 | ir->op12 = op12; |
355 | ir->t.irt = IRT_PTR; | 355 | ir->t.irt = IRT_P32; |
356 | ir->o = IR_KSLOT; | 356 | ir->o = IR_KSLOT; |
357 | ir->prev = J->chain[IR_KSLOT]; | 357 | ir->prev = J->chain[IR_KSLOT]; |
358 | J->chain[IR_KSLOT] = (IRRef1)ref; | 358 | J->chain[IR_KSLOT] = (IRRef1)ref; |
359 | found: | 359 | found: |
360 | return TREF(ref, IRT_PTR); | 360 | return TREF(ref, IRT_P32); |
361 | } | 361 | } |
362 | 362 | ||
363 | /* -- Access to IR constants ---------------------------------------------- */ | 363 | /* -- Access to IR constants ---------------------------------------------- */ |
diff --git a/src/lj_ir.h b/src/lj_ir.h index f0c51bf9..123d87c8 100644 --- a/src/lj_ir.h +++ b/src/lj_ir.h | |||
@@ -243,7 +243,7 @@ typedef struct CCallInfo { | |||
243 | _(lj_str_fromnum, 2, FN, STR, CCI_L) \ | 243 | _(lj_str_fromnum, 2, FN, STR, CCI_L) \ |
244 | _(lj_tab_new1, 2, FS, TAB, CCI_L) \ | 244 | _(lj_tab_new1, 2, FS, TAB, CCI_L) \ |
245 | _(lj_tab_dup, 2, FS, TAB, CCI_L) \ | 245 | _(lj_tab_dup, 2, FS, TAB, CCI_L) \ |
246 | _(lj_tab_newkey, 3, S, PTR, CCI_L) \ | 246 | _(lj_tab_newkey, 3, S, P32, CCI_L) \ |
247 | _(lj_tab_len, 1, FL, INT, 0) \ | 247 | _(lj_tab_len, 1, FL, INT, 0) \ |
248 | _(lj_gc_step_jit, 2, FS, NIL, CCI_L) \ | 248 | _(lj_gc_step_jit, 2, FS, NIL, CCI_L) \ |
249 | _(lj_gc_barrieruv, 2, FS, NIL, 0) \ | 249 | _(lj_gc_barrieruv, 2, FS, NIL, 0) \ |
@@ -311,7 +311,7 @@ typedef enum { | |||
311 | IRT_LIGHTUD, | 311 | IRT_LIGHTUD, |
312 | /* GCobj types are from here ... */ | 312 | /* GCobj types are from here ... */ |
313 | IRT_STR, | 313 | IRT_STR, |
314 | IRT_PTR, /* IRT_PTR never escapes the IR (map of LJ_TUPVAL). */ | 314 | IRT_P32, /* IRT_P32 never escapes the IR (map of LJ_TUPVAL). */ |
315 | IRT_THREAD, | 315 | IRT_THREAD, |
316 | IRT_PROTO, | 316 | IRT_PROTO, |
317 | IRT_FUNC, | 317 | IRT_FUNC, |
diff --git a/src/lj_opt_fold.c b/src/lj_opt_fold.c index 2a7b5abe..6df1a08a 100644 --- a/src/lj_opt_fold.c +++ b/src/lj_opt_fold.c | |||
@@ -326,7 +326,7 @@ LJFOLDF(kfold_strref_snew) | |||
326 | PHIBARRIER(ir); | 326 | PHIBARRIER(ir); |
327 | fins->op2 = emitir(IRTI(IR_ADD), ir->op2, fins->op2); /* Clobbers fins! */ | 327 | fins->op2 = emitir(IRTI(IR_ADD), ir->op2, fins->op2); /* Clobbers fins! */ |
328 | fins->op1 = str; | 328 | fins->op1 = str; |
329 | fins->ot = IRT(IR_STRREF, IRT_PTR); | 329 | fins->ot = IRT(IR_STRREF, IRT_P32); |
330 | return RETRYFOLD; | 330 | return RETRYFOLD; |
331 | } | 331 | } |
332 | return NEXTFOLD; | 332 | return NEXTFOLD; |
diff --git a/src/lj_record.c b/src/lj_record.c index 90c06218..de3f6a64 100644 --- a/src/lj_record.c +++ b/src/lj_record.c | |||
@@ -594,7 +594,7 @@ void lj_record_ret(jit_State *J, BCReg rbase, ptrdiff_t gotresults) | |||
594 | } else { /* Return to lower frame. Guard for the target we return to. */ | 594 | } else { /* Return to lower frame. Guard for the target we return to. */ |
595 | TRef trpt = lj_ir_kgc(J, obj2gco(pt), IRT_PROTO); | 595 | TRef trpt = lj_ir_kgc(J, obj2gco(pt), IRT_PROTO); |
596 | TRef trpc = lj_ir_kptr(J, (void *)frame_pc(frame)); | 596 | TRef trpc = lj_ir_kptr(J, (void *)frame_pc(frame)); |
597 | emitir(IRTG(IR_RETF, IRT_PTR), trpt, trpc); | 597 | emitir(IRTG(IR_RETF, IRT_P32), trpt, trpc); |
598 | J->retdepth++; | 598 | J->retdepth++; |
599 | J->needsnap = 1; | 599 | J->needsnap = 1; |
600 | lua_assert(J->baseslot == 1); | 600 | lua_assert(J->baseslot == 1); |
@@ -826,12 +826,12 @@ static void rec_idx_abc(jit_State *J, TRef asizeref, TRef ikey, uint32_t asize) | |||
826 | /* Runtime value for stop of loop is within bounds? */ | 826 | /* Runtime value for stop of loop is within bounds? */ |
827 | if ((int64_t)stop + ofs < (int64_t)asize) { | 827 | if ((int64_t)stop + ofs < (int64_t)asize) { |
828 | /* Emit invariant bounds check for stop. */ | 828 | /* Emit invariant bounds check for stop. */ |
829 | emitir(IRTG(IR_ABC, IRT_PTR), asizeref, ofs == 0 ? J->scev.stop : | 829 | emitir(IRTG(IR_ABC, IRT_P32), asizeref, ofs == 0 ? J->scev.stop : |
830 | emitir(IRTI(IR_ADD), J->scev.stop, ofsref)); | 830 | emitir(IRTI(IR_ADD), J->scev.stop, ofsref)); |
831 | /* Emit invariant bounds check for start, if not const or negative. */ | 831 | /* Emit invariant bounds check for start, if not const or negative. */ |
832 | if (!(J->scev.dir && J->scev.start && | 832 | if (!(J->scev.dir && J->scev.start && |
833 | (int64_t)IR(J->scev.start)->i + ofs >= 0)) | 833 | (int64_t)IR(J->scev.start)->i + ofs >= 0)) |
834 | emitir(IRTG(IR_ABC, IRT_PTR), asizeref, ikey); | 834 | emitir(IRTG(IR_ABC, IRT_P32), asizeref, ikey); |
835 | return; | 835 | return; |
836 | } | 836 | } |
837 | } | 837 | } |
@@ -861,8 +861,8 @@ static TRef rec_idx_key(jit_State *J, RecordIndex *ix) | |||
861 | if ((MSize)k < t->asize) { /* Currently an array key? */ | 861 | if ((MSize)k < t->asize) { /* Currently an array key? */ |
862 | TRef arrayref; | 862 | TRef arrayref; |
863 | rec_idx_abc(J, asizeref, ikey, t->asize); | 863 | rec_idx_abc(J, asizeref, ikey, t->asize); |
864 | arrayref = emitir(IRT(IR_FLOAD, IRT_PTR), ix->tab, IRFL_TAB_ARRAY); | 864 | arrayref = emitir(IRT(IR_FLOAD, IRT_P32), ix->tab, IRFL_TAB_ARRAY); |
865 | return emitir(IRT(IR_AREF, IRT_PTR), arrayref, ikey); | 865 | return emitir(IRT(IR_AREF, IRT_P32), arrayref, ikey); |
866 | } else { /* Currently not in array (may be an array extension)? */ | 866 | } else { /* Currently not in array (may be an array extension)? */ |
867 | emitir(IRTGI(IR_ULE), asizeref, ikey); /* Inv. bounds check. */ | 867 | emitir(IRTGI(IR_ULE), asizeref, ikey); /* Inv. bounds check. */ |
868 | if (k == 0 && tref_isk(key)) | 868 | if (k == 0 && tref_isk(key)) |
@@ -894,13 +894,13 @@ static TRef rec_idx_key(jit_State *J, RecordIndex *ix) | |||
894 | TRef node, kslot; | 894 | TRef node, kslot; |
895 | TRef hm = emitir(IRTI(IR_FLOAD), ix->tab, IRFL_TAB_HMASK); | 895 | TRef hm = emitir(IRTI(IR_FLOAD), ix->tab, IRFL_TAB_HMASK); |
896 | emitir(IRTGI(IR_EQ), hm, lj_ir_kint(J, (int32_t)t->hmask)); | 896 | emitir(IRTGI(IR_EQ), hm, lj_ir_kint(J, (int32_t)t->hmask)); |
897 | node = emitir(IRT(IR_FLOAD, IRT_PTR), ix->tab, IRFL_TAB_NODE); | 897 | node = emitir(IRT(IR_FLOAD, IRT_P32), ix->tab, IRFL_TAB_NODE); |
898 | kslot = lj_ir_kslot(J, key, hslot / sizeof(Node)); | 898 | kslot = lj_ir_kslot(J, key, hslot / sizeof(Node)); |
899 | return emitir(IRTG(IR_HREFK, IRT_PTR), node, kslot); | 899 | return emitir(IRTG(IR_HREFK, IRT_P32), node, kslot); |
900 | } | 900 | } |
901 | } | 901 | } |
902 | /* Fall back to a regular hash lookup. */ | 902 | /* Fall back to a regular hash lookup. */ |
903 | return emitir(IRT(IR_HREF, IRT_PTR), ix->tab, key); | 903 | return emitir(IRT(IR_HREF, IRT_P32), ix->tab, key); |
904 | } | 904 | } |
905 | 905 | ||
906 | /* Determine whether a key is NOT one of the fast metamethod names. */ | 906 | /* 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) | |||
979 | IRType t = itype2irt(oldv); | 979 | IRType t = itype2irt(oldv); |
980 | TRef res; | 980 | TRef res; |
981 | if (oldv == niltvg(J2G(J))) { | 981 | if (oldv == niltvg(J2G(J))) { |
982 | emitir(IRTG(IR_EQ, IRT_PTR), xref, lj_ir_kptr(J, niltvg(J2G(J)))); | 982 | emitir(IRTG(IR_EQ, IRT_P32), xref, lj_ir_kptr(J, niltvg(J2G(J)))); |
983 | res = TREF_NIL; | 983 | res = TREF_NIL; |
984 | } else { | 984 | } else { |
985 | res = emitir(IRTG(loadop, t), xref, 0); | 985 | res = emitir(IRTG(loadop, t), xref, 0); |
@@ -1001,7 +1001,7 @@ TRef lj_record_idx(jit_State *J, RecordIndex *ix) | |||
1001 | if (hasmm) | 1001 | if (hasmm) |
1002 | emitir(IRTG(loadop, IRT_NIL), xref, 0); /* Guard for nil value. */ | 1002 | emitir(IRTG(loadop, IRT_NIL), xref, 0); /* Guard for nil value. */ |
1003 | else if (xrefop == IR_HREF) | 1003 | else if (xrefop == IR_HREF) |
1004 | emitir(IRTG(oldv == niltvg(J2G(J)) ? IR_EQ : IR_NE, IRT_PTR), | 1004 | emitir(IRTG(oldv == niltvg(J2G(J)) ? IR_EQ : IR_NE, IRT_P32), |
1005 | xref, lj_ir_kptr(J, niltvg(J2G(J)))); | 1005 | xref, lj_ir_kptr(J, niltvg(J2G(J)))); |
1006 | if (ix->idxchain && lj_record_mm_lookup(J, ix, MM_newindex)) { | 1006 | if (ix->idxchain && lj_record_mm_lookup(J, ix, MM_newindex)) { |
1007 | lua_assert(hasmm); | 1007 | lua_assert(hasmm); |
@@ -1012,13 +1012,13 @@ TRef lj_record_idx(jit_State *J, RecordIndex *ix) | |||
1012 | TRef key = ix->key; | 1012 | TRef key = ix->key; |
1013 | if (tref_isinteger(key)) /* NEWREF needs a TValue as a key. */ | 1013 | if (tref_isinteger(key)) /* NEWREF needs a TValue as a key. */ |
1014 | key = emitir(IRTN(IR_TONUM), key, 0); | 1014 | key = emitir(IRTN(IR_TONUM), key, 0); |
1015 | xref = emitir(IRT(IR_NEWREF, IRT_PTR), ix->tab, key); | 1015 | xref = emitir(IRT(IR_NEWREF, IRT_P32), ix->tab, key); |
1016 | keybarrier = 0; /* NEWREF already takes care of the key barrier. */ | 1016 | keybarrier = 0; /* NEWREF already takes care of the key barrier. */ |
1017 | } | 1017 | } |
1018 | } else if (!lj_opt_fwd_wasnonnil(J, loadop, tref_ref(xref))) { | 1018 | } else if (!lj_opt_fwd_wasnonnil(J, loadop, tref_ref(xref))) { |
1019 | /* Cannot derive that the previous value was non-nil, must do checks. */ | 1019 | /* Cannot derive that the previous value was non-nil, must do checks. */ |
1020 | if (xrefop == IR_HREF) /* Guard against store to niltv. */ | 1020 | if (xrefop == IR_HREF) /* Guard against store to niltv. */ |
1021 | emitir(IRTG(IR_NE, IRT_PTR), xref, lj_ir_kptr(J, niltvg(J2G(J)))); | 1021 | emitir(IRTG(IR_NE, IRT_P32), xref, lj_ir_kptr(J, niltvg(J2G(J)))); |
1022 | if (ix->idxchain) { /* Metamethod lookup required? */ | 1022 | if (ix->idxchain) { /* Metamethod lookup required? */ |
1023 | /* A check for NULL metatable is cheaper (hoistable) than a load. */ | 1023 | /* A check for NULL metatable is cheaper (hoistable) than a load. */ |
1024 | if (!mt) { | 1024 | if (!mt) { |
@@ -1039,7 +1039,7 @@ TRef lj_record_idx(jit_State *J, RecordIndex *ix) | |||
1039 | emitir(IRT(IR_TBAR, IRT_NIL), ix->tab, 0); | 1039 | emitir(IRT(IR_TBAR, IRT_NIL), ix->tab, 0); |
1040 | /* Invalidate neg. metamethod cache for stores with certain string keys. */ | 1040 | /* Invalidate neg. metamethod cache for stores with certain string keys. */ |
1041 | if (!nommstr(J, ix->key)) { | 1041 | if (!nommstr(J, ix->key)) { |
1042 | TRef fref = emitir(IRT(IR_FREF, IRT_PTR), ix->tab, IRFL_TAB_NOMM); | 1042 | TRef fref = emitir(IRT(IR_FREF, IRT_P32), ix->tab, IRFL_TAB_NOMM); |
1043 | emitir(IRT(IR_FSTORE, IRT_U8), fref, lj_ir_kint(J, 0)); | 1043 | emitir(IRT(IR_FSTORE, IRT_U8), fref, lj_ir_kint(J, 0)); |
1044 | } | 1044 | } |
1045 | J->needsnap = 1; | 1045 | J->needsnap = 1; |
@@ -1075,10 +1075,10 @@ static TRef rec_upvalue(jit_State *J, uint32_t uv, TRef val) | |||
1075 | } | 1075 | } |
1076 | } | 1076 | } |
1077 | } | 1077 | } |
1078 | uref = tref_ref(emitir(IRTG(IR_UREFO, IRT_PTR), fn, uv)); | 1078 | uref = tref_ref(emitir(IRTG(IR_UREFO, IRT_P32), fn, uv)); |
1079 | } else { | 1079 | } else { |
1080 | needbarrier = 1; | 1080 | needbarrier = 1; |
1081 | uref = tref_ref(emitir(IRTG(IR_UREFC, IRT_PTR), fn, uv)); | 1081 | uref = tref_ref(emitir(IRTG(IR_UREFC, IRT_P32), fn, uv)); |
1082 | } | 1082 | } |
1083 | if (val == 0) { /* Upvalue load */ | 1083 | if (val == 0) { /* Upvalue load */ |
1084 | IRType t = itype2irt(uvval(uvp)); | 1084 | IRType t = itype2irt(uvval(uvp)); |
@@ -1218,10 +1218,10 @@ static void rec_varg(jit_State *J, BCReg dst, ptrdiff_t nresults) | |||
1218 | else | 1218 | else |
1219 | emitir(IRTGI(IR_EQ), fr, lj_ir_kint(J, frame_ftsz(J->L->base-1))); | 1219 | emitir(IRTGI(IR_EQ), fr, lj_ir_kint(J, frame_ftsz(J->L->base-1))); |
1220 | vbase = emitir(IRTI(IR_SUB), REF_BASE, fr); | 1220 | vbase = emitir(IRTI(IR_SUB), REF_BASE, fr); |
1221 | vbase = emitir(IRT(IR_ADD, IRT_PTR), vbase, lj_ir_kint(J, frofs-8)); | 1221 | vbase = emitir(IRT(IR_ADD, IRT_P32), vbase, lj_ir_kint(J, frofs-8)); |
1222 | for (i = 0; i < nload; i++) { | 1222 | for (i = 0; i < nload; i++) { |
1223 | IRType t = itype2irt(&J->L->base[i-1-nvararg]); | 1223 | IRType t = itype2irt(&J->L->base[i-1-nvararg]); |
1224 | TRef aref = emitir(IRT(IR_AREF, IRT_PTR), | 1224 | TRef aref = emitir(IRT(IR_AREF, IRT_P32), |
1225 | vbase, lj_ir_kint(J, (int32_t)i)); | 1225 | vbase, lj_ir_kint(J, (int32_t)i)); |
1226 | TRef tr = emitir(IRTG(IR_VLOAD, t), aref, 0); | 1226 | TRef tr = emitir(IRTG(IR_VLOAD, t), aref, 0); |
1227 | if (irtype_ispri(t)) tr = TREF_PRI(t); /* Canonicalize primitives. */ | 1227 | 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) | |||
1268 | if (idx != 0 && idx <= nvararg) { | 1268 | if (idx != 0 && idx <= nvararg) { |
1269 | IRType t; | 1269 | IRType t; |
1270 | TRef aref, vbase = emitir(IRTI(IR_SUB), REF_BASE, fr); | 1270 | TRef aref, vbase = emitir(IRTI(IR_SUB), REF_BASE, fr); |
1271 | vbase = emitir(IRT(IR_ADD, IRT_PTR), vbase, lj_ir_kint(J, frofs-8)); | 1271 | vbase = emitir(IRT(IR_ADD, IRT_P32), vbase, lj_ir_kint(J, frofs-8)); |
1272 | t = itype2irt(&J->L->base[idx-2-nvararg]); | 1272 | t = itype2irt(&J->L->base[idx-2-nvararg]); |
1273 | aref = emitir(IRT(IR_AREF, IRT_PTR), vbase, tridx); | 1273 | aref = emitir(IRT(IR_AREF, IRT_P32), vbase, tridx); |
1274 | tr = emitir(IRTG(IR_VLOAD, t), aref, 0); | 1274 | tr = emitir(IRTG(IR_VLOAD, t), aref, 0); |
1275 | if (irtype_ispri(t)) tr = TREF_PRI(t); /* Canonicalize primitives. */ | 1275 | if (irtype_ispri(t)) tr = TREF_PRI(t); /* Canonicalize primitives. */ |
1276 | } | 1276 | } |
@@ -1913,7 +1913,7 @@ void lj_record_setup(jit_State *J) | |||
1913 | J->bc_extent = ~(MSize)0; | 1913 | J->bc_extent = ~(MSize)0; |
1914 | 1914 | ||
1915 | /* Emit instructions for fixed references. Also triggers initial IR alloc. */ | 1915 | /* Emit instructions for fixed references. Also triggers initial IR alloc. */ |
1916 | emitir_raw(IRT(IR_BASE, IRT_PTR), J->parent, J->exitno); | 1916 | emitir_raw(IRT(IR_BASE, IRT_P32), J->parent, J->exitno); |
1917 | for (i = 0; i <= 2; i++) { | 1917 | for (i = 0; i <= 2; i++) { |
1918 | IRIns *ir = IR(REF_NIL-i); | 1918 | IRIns *ir = IR(REF_NIL-i); |
1919 | ir->i = 0; | 1919 | ir->i = 0; |