aboutsummaryrefslogtreecommitdiff
path: root/src/lj_snap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_snap.c')
-rw-r--r--src/lj_snap.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/lj_snap.c b/src/lj_snap.c
index bb063c2b..44fa379f 100644
--- a/src/lj_snap.c
+++ b/src/lj_snap.c
@@ -93,7 +93,7 @@ static MSize snapshot_slots(jit_State *J, SnapEntry *map, BCReg nslots)
93 (ir->op2 & (IRSLOAD_READONLY|IRSLOAD_PARENT)) != IRSLOAD_PARENT) 93 (ir->op2 & (IRSLOAD_READONLY|IRSLOAD_PARENT)) != IRSLOAD_PARENT)
94 sn |= SNAP_NORESTORE; 94 sn |= SNAP_NORESTORE;
95 } 95 }
96 if (LJ_SOFTFP && irt_isnum(ir->t)) 96 if (LJ_SOFTFP32 && irt_isnum(ir->t))
97 sn |= SNAP_SOFTFPNUM; 97 sn |= SNAP_SOFTFPNUM;
98 map[n++] = sn; 98 map[n++] = sn;
99 } 99 }
@@ -374,7 +374,7 @@ IRIns *lj_snap_regspmap(GCtrace *T, SnapNo snapno, IRIns *ir)
374 break; 374 break;
375 } 375 }
376 } 376 }
377 } else if (LJ_SOFTFP && ir->o == IR_HIOP) { 377 } else if (LJ_SOFTFP32 && ir->o == IR_HIOP) {
378 ref++; 378 ref++;
379 } else if (ir->o == IR_PVAL) { 379 } else if (ir->o == IR_PVAL) {
380 ref = ir->op1 + REF_BIAS; 380 ref = ir->op1 + REF_BIAS;
@@ -486,7 +486,7 @@ void lj_snap_replay(jit_State *J, GCtrace *T)
486 } else { 486 } else {
487 IRType t = irt_type(ir->t); 487 IRType t = irt_type(ir->t);
488 uint32_t mode = IRSLOAD_INHERIT|IRSLOAD_PARENT; 488 uint32_t mode = IRSLOAD_INHERIT|IRSLOAD_PARENT;
489 if (LJ_SOFTFP && (sn & SNAP_SOFTFPNUM)) t = IRT_NUM; 489 if (LJ_SOFTFP32 && (sn & SNAP_SOFTFPNUM)) t = IRT_NUM;
490 if (ir->o == IR_SLOAD) mode |= (ir->op2 & IRSLOAD_READONLY); 490 if (ir->o == IR_SLOAD) mode |= (ir->op2 & IRSLOAD_READONLY);
491 tr = emitir_raw(IRT(IR_SLOAD, t), s, mode); 491 tr = emitir_raw(IRT(IR_SLOAD, t), s, mode);
492 } 492 }
@@ -520,7 +520,7 @@ void lj_snap_replay(jit_State *J, GCtrace *T)
520 if (irs->r == RID_SINK && snap_sunk_store(T, ir, irs)) { 520 if (irs->r == RID_SINK && snap_sunk_store(T, ir, irs)) {
521 if (snap_pref(J, T, map, nent, seen, irs->op2) == 0) 521 if (snap_pref(J, T, map, nent, seen, irs->op2) == 0)
522 snap_pref(J, T, map, nent, seen, T->ir[irs->op2].op1); 522 snap_pref(J, T, map, nent, seen, T->ir[irs->op2].op1);
523 else if ((LJ_SOFTFP || (LJ_32 && LJ_HASFFI)) && 523 else if ((LJ_SOFTFP32 || (LJ_32 && LJ_HASFFI)) &&
524 irs+1 < irlast && (irs+1)->o == IR_HIOP) 524 irs+1 < irlast && (irs+1)->o == IR_HIOP)
525 snap_pref(J, T, map, nent, seen, (irs+1)->op2); 525 snap_pref(J, T, map, nent, seen, (irs+1)->op2);
526 } 526 }
@@ -579,10 +579,10 @@ void lj_snap_replay(jit_State *J, GCtrace *T)
579 lua_assert(irc->o == IR_CONV && irc->op2 == IRCONV_NUM_INT); 579 lua_assert(irc->o == IR_CONV && irc->op2 == IRCONV_NUM_INT);
580 val = snap_pref(J, T, map, nent, seen, irc->op1); 580 val = snap_pref(J, T, map, nent, seen, irc->op1);
581 val = emitir(IRTN(IR_CONV), val, IRCONV_NUM_INT); 581 val = emitir(IRTN(IR_CONV), val, IRCONV_NUM_INT);
582 } else if ((LJ_SOFTFP || (LJ_32 && LJ_HASFFI)) && 582 } else if ((LJ_SOFTFP32 || (LJ_32 && LJ_HASFFI)) &&
583 irs+1 < irlast && (irs+1)->o == IR_HIOP) { 583 irs+1 < irlast && (irs+1)->o == IR_HIOP) {
584 IRType t = IRT_I64; 584 IRType t = IRT_I64;
585 if (LJ_SOFTFP && irt_type((irs+1)->t) == IRT_SOFTFP) 585 if (LJ_SOFTFP32 && irt_type((irs+1)->t) == IRT_SOFTFP)
586 t = IRT_NUM; 586 t = IRT_NUM;
587 lj_needsplit(J); 587 lj_needsplit(J);
588 if (irref_isk(irs->op2) && irref_isk((irs+1)->op2)) { 588 if (irref_isk(irs->op2) && irref_isk((irs+1)->op2)) {
@@ -635,7 +635,7 @@ static void snap_restoreval(jit_State *J, GCtrace *T, ExitState *ex,
635 int32_t *sps = &ex->spill[regsp_spill(rs)]; 635 int32_t *sps = &ex->spill[regsp_spill(rs)];
636 if (irt_isinteger(t)) { 636 if (irt_isinteger(t)) {
637 setintV(o, *sps); 637 setintV(o, *sps);
638#if !LJ_SOFTFP 638#if !LJ_SOFTFP32
639 } else if (irt_isnum(t)) { 639 } else if (irt_isnum(t)) {
640 o->u64 = *(uint64_t *)sps; 640 o->u64 = *(uint64_t *)sps;
641#endif 641#endif
@@ -660,6 +660,9 @@ static void snap_restoreval(jit_State *J, GCtrace *T, ExitState *ex,
660#if !LJ_SOFTFP 660#if !LJ_SOFTFP
661 } else if (irt_isnum(t)) { 661 } else if (irt_isnum(t)) {
662 setnumV(o, ex->fpr[r-RID_MIN_FPR]); 662 setnumV(o, ex->fpr[r-RID_MIN_FPR]);
663#elif LJ_64 /* && LJ_SOFTFP */
664 } else if (irt_isnum(t)) {
665 o->u64 = ex->gpr[r-RID_MIN_GPR];
663#endif 666#endif
664#if LJ_64 && !LJ_GC64 667#if LJ_64 && !LJ_GC64
665 } else if (irt_is64(t)) { 668 } else if (irt_is64(t)) {
@@ -813,7 +816,7 @@ static void snap_unsink(jit_State *J, GCtrace *T, ExitState *ex,
813 val = lj_tab_set(J->L, t, &tmp); 816 val = lj_tab_set(J->L, t, &tmp);
814 /* NOBARRIER: The table is new (marked white). */ 817 /* NOBARRIER: The table is new (marked white). */
815 snap_restoreval(J, T, ex, snapno, rfilt, irs->op2, val); 818 snap_restoreval(J, T, ex, snapno, rfilt, irs->op2, val);
816 if (LJ_SOFTFP && irs+1 < T->ir + T->nins && (irs+1)->o == IR_HIOP) { 819 if (LJ_SOFTFP32 && irs+1 < T->ir + T->nins && (irs+1)->o == IR_HIOP) {
817 snap_restoreval(J, T, ex, snapno, rfilt, (irs+1)->op2, &tmp); 820 snap_restoreval(J, T, ex, snapno, rfilt, (irs+1)->op2, &tmp);
818 val->u32.hi = tmp.u32.lo; 821 val->u32.hi = tmp.u32.lo;
819 } 822 }
@@ -874,7 +877,7 @@ const BCIns *lj_snap_restore(jit_State *J, void *exptr)
874 continue; 877 continue;
875 } 878 }
876 snap_restoreval(J, T, ex, snapno, rfilt, ref, o); 879 snap_restoreval(J, T, ex, snapno, rfilt, ref, o);
877 if (LJ_SOFTFP && (sn & SNAP_SOFTFPNUM) && tvisint(o)) { 880 if (LJ_SOFTFP32 && (sn & SNAP_SOFTFPNUM) && tvisint(o)) {
878 TValue tmp; 881 TValue tmp;
879 snap_restoreval(J, T, ex, snapno, rfilt, ref+1, &tmp); 882 snap_restoreval(J, T, ex, snapno, rfilt, ref+1, &tmp);
880 o->u32.hi = tmp.u32.lo; 883 o->u32.hi = tmp.u32.lo;