diff options
author | Mike Pall <mike> | 2016-05-23 06:01:54 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2016-05-23 06:01:54 +0200 |
commit | 2868715d80b6ac497a7f08393ec325b60d71df8d (patch) | |
tree | 2064588fe32607f19f56ed0d23d4fb225b82e068 /src/lj_snap.c | |
parent | 6c8258d74b7d4ae7f288897518f23c809b9395f2 (diff) | |
download | luajit-2868715d80b6ac497a7f08393ec325b60d71df8d.tar.gz luajit-2868715d80b6ac497a7f08393ec325b60d71df8d.tar.bz2 luajit-2868715d80b6ac497a7f08393ec325b60d71df8d.zip |
x64/LJ_GC64: Add missing backend support and enable JIT compilation.
Contributed by Peter Cawley.
Diffstat (limited to 'src/lj_snap.c')
-rw-r--r-- | src/lj_snap.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lj_snap.c b/src/lj_snap.c index 33c058be..0a08d4d4 100644 --- a/src/lj_snap.c +++ b/src/lj_snap.c | |||
@@ -623,7 +623,6 @@ static void snap_restoreval(jit_State *J, GCtrace *T, ExitState *ex, | |||
623 | } | 623 | } |
624 | if (LJ_UNLIKELY(bloomtest(rfilt, ref))) | 624 | if (LJ_UNLIKELY(bloomtest(rfilt, ref))) |
625 | rs = snap_renameref(T, snapno, ref, rs); | 625 | rs = snap_renameref(T, snapno, ref, rs); |
626 | lua_assert(!LJ_GC64); /* TODO_GC64: handle 64 bit references. */ | ||
627 | if (ra_hasspill(regsp_spill(rs))) { /* Restore from spill slot. */ | 626 | if (ra_hasspill(regsp_spill(rs))) { /* Restore from spill slot. */ |
628 | int32_t *sps = &ex->spill[regsp_spill(rs)]; | 627 | int32_t *sps = &ex->spill[regsp_spill(rs)]; |
629 | if (irt_isinteger(t)) { | 628 | if (irt_isinteger(t)) { |
@@ -632,9 +631,11 @@ static void snap_restoreval(jit_State *J, GCtrace *T, ExitState *ex, | |||
632 | } else if (irt_isnum(t)) { | 631 | } else if (irt_isnum(t)) { |
633 | o->u64 = *(uint64_t *)sps; | 632 | o->u64 = *(uint64_t *)sps; |
634 | #endif | 633 | #endif |
635 | } else if (LJ_64 && irt_islightud(t)) { | 634 | #if LJ_64 && !LJ_GC64 |
635 | } else if (irt_islightud(t)) { | ||
636 | /* 64 bit lightuserdata which may escape already has the tag bits. */ | 636 | /* 64 bit lightuserdata which may escape already has the tag bits. */ |
637 | o->u64 = *(uint64_t *)sps; | 637 | o->u64 = *(uint64_t *)sps; |
638 | #endif | ||
638 | } else { | 639 | } else { |
639 | lua_assert(!irt_ispri(t)); /* PRI refs never have a spill slot. */ | 640 | lua_assert(!irt_ispri(t)); /* PRI refs never have a spill slot. */ |
640 | setgcV(J->L, o, (GCobj *)(uintptr_t)*(GCSize *)sps, irt_toitype(t)); | 641 | setgcV(J->L, o, (GCobj *)(uintptr_t)*(GCSize *)sps, irt_toitype(t)); |
@@ -652,9 +653,11 @@ static void snap_restoreval(jit_State *J, GCtrace *T, ExitState *ex, | |||
652 | } else if (irt_isnum(t)) { | 653 | } else if (irt_isnum(t)) { |
653 | setnumV(o, ex->fpr[r-RID_MIN_FPR]); | 654 | setnumV(o, ex->fpr[r-RID_MIN_FPR]); |
654 | #endif | 655 | #endif |
655 | } else if (LJ_64 && irt_is64(t)) { | 656 | #if LJ_64 && !LJ_GC64 |
657 | } else if (irt_is64(t)) { | ||
656 | /* 64 bit values that already have the tag bits. */ | 658 | /* 64 bit values that already have the tag bits. */ |
657 | o->u64 = ex->gpr[r-RID_MIN_GPR]; | 659 | o->u64 = ex->gpr[r-RID_MIN_GPR]; |
660 | #endif | ||
658 | } else if (irt_ispri(t)) { | 661 | } else if (irt_ispri(t)) { |
659 | setpriV(o, irt_toitype(t)); | 662 | setpriV(o, irt_toitype(t)); |
660 | } else { | 663 | } else { |