diff options
author | Mike Pall <mike> | 2013-08-26 18:28:58 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2013-08-26 18:28:58 +0200 |
commit | 5120240b77e4544b9b7405b4849a6cc63cdbbe1e (patch) | |
tree | 40bb90b12d912924bc9abf1feb12347b8db6b520 /src/vm_x86.dasc | |
parent | b33e96f3522e96e816cc46470b19d121bf88cfc8 (diff) | |
download | luajit-5120240b77e4544b9b7405b4849a6cc63cdbbe1e.tar.gz luajit-5120240b77e4544b9b7405b4849a6cc63cdbbe1e.tar.bz2 luajit-5120240b77e4544b9b7405b4849a6cc63cdbbe1e.zip |
Use g->jit_base for on/off-trace detection.
Diffstat (limited to 'src/vm_x86.dasc')
-rw-r--r-- | src/vm_x86.dasc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vm_x86.dasc b/src/vm_x86.dasc index 62a5e139..b8f1c449 100644 --- a/src/vm_x86.dasc +++ b/src/vm_x86.dasc | |||
@@ -2708,7 +2708,6 @@ static void build_subroutines(BuildCtx *ctx) | |||
2708 | | mov L:RB, [DISPATCH+DISPATCH_GL(jit_L)] | 2708 | | mov L:RB, [DISPATCH+DISPATCH_GL(jit_L)] |
2709 | | mov BASE, [DISPATCH+DISPATCH_GL(jit_base)] | 2709 | | mov BASE, [DISPATCH+DISPATCH_GL(jit_base)] |
2710 | | mov aword [DISPATCH+DISPATCH_J(L)], L:RBa | 2710 | | mov aword [DISPATCH+DISPATCH_J(L)], L:RBa |
2711 | | mov dword [DISPATCH+DISPATCH_GL(jit_L)], 0 | ||
2712 | | mov L:RB->base, BASE | 2711 | | mov L:RB->base, BASE |
2713 | |.if X64WIN | 2712 | |.if X64WIN |
2714 | | lea CARG2, [rsp+4*8] | 2713 | | lea CARG2, [rsp+4*8] |
@@ -2718,6 +2717,7 @@ static void build_subroutines(BuildCtx *ctx) | |||
2718 | | lea FCARG2, [esp+16] | 2717 | | lea FCARG2, [esp+16] |
2719 | |.endif | 2718 | |.endif |
2720 | | lea FCARG1, [DISPATCH+GG_DISP2J] | 2719 | | lea FCARG1, [DISPATCH+GG_DISP2J] |
2720 | | mov dword [DISPATCH+DISPATCH_GL(jit_base)], 0 | ||
2721 | | call extern lj_trace_exit@8 // (jit_State *J, ExitState *ex) | 2721 | | call extern lj_trace_exit@8 // (jit_State *J, ExitState *ex) |
2722 | | // MULTRES or negated error code returned in eax (RD). | 2722 | | // MULTRES or negated error code returned in eax (RD). |
2723 | | mov RAa, L:RB->cframe | 2723 | | mov RAa, L:RB->cframe |
@@ -2765,11 +2765,13 @@ static void build_subroutines(BuildCtx *ctx) | |||
2765 | | mov r12, TMPQ | 2765 | | mov r12, TMPQ |
2766 | |.endif | 2766 | |.endif |
2767 | | test RD, RD; js >3 // Check for error from exit. | 2767 | | test RD, RD; js >3 // Check for error from exit. |
2768 | | mov L:RB, SAVE_L | ||
2768 | | mov MULTRES, RD | 2769 | | mov MULTRES, RD |
2769 | | mov LFUNC:KBASE, [BASE-8] | 2770 | | mov LFUNC:KBASE, [BASE-8] |
2770 | | mov KBASE, LFUNC:KBASE->pc | 2771 | | mov KBASE, LFUNC:KBASE->pc |
2771 | | mov KBASE, [KBASE+PC2PROTO(k)] | 2772 | | mov KBASE, [KBASE+PC2PROTO(k)] |
2772 | | mov dword [DISPATCH+DISPATCH_GL(jit_L)], 0 | 2773 | | mov L:RB->base, BASE |
2774 | | mov dword [DISPATCH+DISPATCH_GL(jit_base)], 0 | ||
2773 | | set_vmstate INTERP | 2775 | | set_vmstate INTERP |
2774 | | // Modified copy of ins_next which handles function header dispatch, too. | 2776 | | // Modified copy of ins_next which handles function header dispatch, too. |
2775 | | mov RC, [PC] | 2777 | | mov RC, [PC] |