diff options
Diffstat (limited to '')
-rw-r--r-- | src/buildvm_x86.dasc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/buildvm_x86.dasc b/src/buildvm_x86.dasc index 9d201f91..5ec87aa8 100644 --- a/src/buildvm_x86.dasc +++ b/src/buildvm_x86.dasc | |||
@@ -2518,14 +2518,15 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse) | |||
2518 | #endif | 2518 | #endif |
2519 | | | 2519 | | |
2520 | |->vm_callhook: // Dispatch target for call hooks. | 2520 | |->vm_callhook: // Dispatch target for call hooks. |
2521 | | mov SAVE_PC, PC | ||
2521 | #if LJ_HASJIT | 2522 | #if LJ_HASJIT |
2522 | | mov aword [DISPATCH+DISPATCH_J(L)], 0 // Marker for call hook. | ||
2523 | | jmp >1 | 2523 | | jmp >1 |
2524 | #endif | 2524 | #endif |
2525 | | | 2525 | | |
2526 | |->vm_hotcall: // Hot call counter underflow. | 2526 | |->vm_hotcall: // Hot call counter underflow. |
2527 | #if LJ_HASJIT | 2527 | #if LJ_HASJIT |
2528 | | mov aword [DISPATCH+DISPATCH_J(L)], L:RBa | 2528 | | mov SAVE_PC, PC |
2529 | | or PC, 1 // Marker for hot call. | ||
2529 | |1: | 2530 | |1: |
2530 | #endif | 2531 | #endif |
2531 | | lea RD, [BASE+NARGS:RD*8-8] | 2532 | | lea RD, [BASE+NARGS:RD*8-8] |
@@ -2534,10 +2535,12 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse) | |||
2534 | | mov L:RB->top, RD | 2535 | | mov L:RB->top, RD |
2535 | | mov FCARG2, PC | 2536 | | mov FCARG2, PC |
2536 | | mov FCARG1, L:RB | 2537 | | mov FCARG1, L:RB |
2537 | | mov SAVE_PC, PC | ||
2538 | | call extern lj_dispatch_call@8 // (lua_State *L, const BCIns *pc) | 2538 | | call extern lj_dispatch_call@8 // (lua_State *L, const BCIns *pc) |
2539 | | // ASMFunction returned in eax/rax (RDa). | 2539 | | // ASMFunction returned in eax/rax (RDa). |
2540 | | mov SAVE_PC, 0 // Invalidate for subsequent line hook. | 2540 | | mov SAVE_PC, 0 // Invalidate for subsequent line hook. |
2541 | #if LJ_HASJIT | ||
2542 | | and PC, -2 | ||
2543 | #endif | ||
2541 | | mov BASE, L:RB->base | 2544 | | mov BASE, L:RB->base |
2542 | | mov RAa, RDa | 2545 | | mov RAa, RDa |
2543 | | mov RD, L:RB->top | 2546 | | mov RD, L:RB->top |