summaryrefslogtreecommitdiff
path: root/src/buildvm_x86.dasc
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildvm_x86.dasc')
-rw-r--r--src/buildvm_x86.dasc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/buildvm_x86.dasc b/src/buildvm_x86.dasc
index 23a98c21..4d3b081c 100644
--- a/src/buildvm_x86.dasc
+++ b/src/buildvm_x86.dasc
@@ -2623,7 +2623,7 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
2623 |.endif 2623 |.endif
2624 | lea FCARG1, [DISPATCH+GG_DISP2J] 2624 | lea FCARG1, [DISPATCH+GG_DISP2J]
2625 | call extern lj_trace_exit@8 // (jit_State *J, ExitState *ex) 2625 | call extern lj_trace_exit@8 // (jit_State *J, ExitState *ex)
2626 | // Error code returned in eax (RD). 2626 | // MULTRES or negated error code returned in eax (RD).
2627 | mov RAa, L:RB->cframe 2627 | mov RAa, L:RB->cframe
2628 | and RAa, CFRAME_RAWMASK 2628 | and RAa, CFRAME_RAWMASK
2629 |.if X64WIN 2629 |.if X64WIN
@@ -2638,14 +2638,12 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
2638 | mov PC, [RAa+CFRAME_OFS_PC] // Get SAVE_PC. 2638 | mov PC, [RAa+CFRAME_OFS_PC] // Get SAVE_PC.
2639 |.if X64 2639 |.if X64
2640 | jmp >1 2640 | jmp >1
2641 |.else
2642 | test RD, RD; jnz >2 // Check for error from exit.
2643 |.endif 2641 |.endif
2644#endif 2642#endif
2645 |->vm_exit_interp: 2643 |->vm_exit_interp:
2644 | // RD = MULTRES or negated error code, BASE, PC and DISPATCH set.
2646#if LJ_HASJIT 2645#if LJ_HASJIT
2647 |.if X64 2646 |.if X64
2648 | xor RD, RD
2649 | // Restore additional callee-save registers only used in compiled code. 2647 | // Restore additional callee-save registers only used in compiled code.
2650 |.if X64WIN 2648 |.if X64WIN
2651 | lea RAa, [rsp+9*16+4*8] 2649 | lea RAa, [rsp+9*16+4*8]
@@ -2669,8 +2667,9 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
2669 |.endif 2667 |.endif
2670 | mov r13, TMPa 2668 | mov r13, TMPa
2671 | mov r12, TMPQ 2669 | mov r12, TMPQ
2672 | test RD, RD; jnz >2 // Check for error from exit.
2673 |.endif 2670 |.endif
2671 | test RD, RD; js >2 // Check for error from exit.
2672 | mov MULTRES, RD
2674 | mov LFUNC:KBASE, [BASE-8] 2673 | mov LFUNC:KBASE, [BASE-8]
2675 | mov KBASE, LFUNC:KBASE->pc 2674 | mov KBASE, LFUNC:KBASE->pc
2676 | mov KBASE, [KBASE+PC2PROTO(k)] 2675 | mov KBASE, [KBASE+PC2PROTO(k)]
@@ -2679,6 +2678,7 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
2679 | ins_next 2678 | ins_next
2680 | 2679 |
2681 |2: // Rethrow error from the right C frame. 2680 |2: // Rethrow error from the right C frame.
2681 | neg RD
2682 | mov FCARG1, L:RB 2682 | mov FCARG1, L:RB
2683 | mov FCARG2, RD 2683 | mov FCARG2, RD
2684 | call extern lj_err_throw@8 // (lua_State *L, int errcode) 2684 | call extern lj_err_throw@8 // (lua_State *L, int errcode)