summaryrefslogtreecommitdiff
path: root/src/lj_asm.c
diff options
context:
space:
mode:
authorMike Pall <mike>2016-05-23 06:01:54 +0200
committerMike Pall <mike>2016-05-23 06:01:54 +0200
commit2868715d80b6ac497a7f08393ec325b60d71df8d (patch)
tree2064588fe32607f19f56ed0d23d4fb225b82e068 /src/lj_asm.c
parent6c8258d74b7d4ae7f288897518f23c809b9395f2 (diff)
downloadluajit-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_asm.c')
-rw-r--r--src/lj_asm.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c
index 5dd7ca3a..dba5c178 100644
--- a/src/lj_asm.c
+++ b/src/lj_asm.c
@@ -346,6 +346,12 @@ static Reg ra_rematk(ASMState *as, IRRef ref)
346#if LJ_64 346#if LJ_64
347 } else if (ir->o == IR_KINT64) { 347 } else if (ir->o == IR_KINT64) {
348 emit_loadu64(as, r, ir_kint64(ir)->u64); 348 emit_loadu64(as, r, ir_kint64(ir)->u64);
349#if LJ_GC64
350 } else if (ir->o == IR_KGC) {
351 emit_loadu64(as, r, (uintptr_t)ir_kgc(ir));
352 } else if (ir->o == IR_KPTR || ir->o == IR_KKPTR) {
353 emit_loadu64(as, r, (uintptr_t)ir_kptr(ir));
354#endif
349#endif 355#endif
350 } else { 356 } else {
351 lua_assert(ir->o == IR_KINT || ir->o == IR_KGC || 357 lua_assert(ir->o == IR_KINT || ir->o == IR_KGC ||
@@ -1920,8 +1926,12 @@ static void asm_tail_link(ASMState *as)
1920 if (bc_isret(bc_op(*retpc))) 1926 if (bc_isret(bc_op(*retpc)))
1921 pc = retpc; 1927 pc = retpc;
1922 } 1928 }
1929#if LJ_GC64
1930 emit_loadu64(as, RID_LPC, u64ptr(pc));
1931#else
1923 ra_allockreg(as, i32ptr(J2GG(as->J)->dispatch), RID_DISPATCH); 1932 ra_allockreg(as, i32ptr(J2GG(as->J)->dispatch), RID_DISPATCH);
1924 ra_allockreg(as, i32ptr(pc), RID_LPC); 1933 ra_allockreg(as, i32ptr(pc), RID_LPC);
1934#endif
1925 mres = (int32_t)(snap->nslots - baseslot - LJ_FR2); 1935 mres = (int32_t)(snap->nslots - baseslot - LJ_FR2);
1926 switch (bc_op(*pc)) { 1936 switch (bc_op(*pc)) {
1927 case BC_CALLM: case BC_CALLMT: 1937 case BC_CALLM: case BC_CALLMT:
@@ -2314,6 +2324,7 @@ void lj_asm_trace(jit_State *J, GCtrace *T)
2314 as->curins = as->T->snap[0].ref; 2324 as->curins = as->T->snap[0].ref;
2315 asm_snap_prep(as); /* The GC check is a guard. */ 2325 asm_snap_prep(as); /* The GC check is a guard. */
2316 asm_gc_check(as); 2326 asm_gc_check(as);
2327 as->curins = as->stopins;
2317 } 2328 }
2318 ra_evictk(as); 2329 ra_evictk(as);
2319 if (as->parent) 2330 if (as->parent)