aboutsummaryrefslogtreecommitdiff
path: root/src/vm_x86.dasc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/vm_x86.dasc15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/vm_x86.dasc b/src/vm_x86.dasc
index 7fe891b1..eaa99740 100644
--- a/src/vm_x86.dasc
+++ b/src/vm_x86.dasc
@@ -2588,7 +2588,7 @@ static void build_subroutines(BuildCtx *ctx)
2588 | mov FCARG2, PC // Caveat: FCARG2 == BASE 2588 | mov FCARG2, PC // Caveat: FCARG2 == BASE
2589 | mov FCARG1, L:RB 2589 | mov FCARG1, L:RB
2590 | // SAVE_PC must hold the _previous_ PC. The callee updates it with PC. 2590 | // SAVE_PC must hold the _previous_ PC. The callee updates it with PC.
2591 | call extern lj_dispatch_ins@8 // (lua_State *L, BCIns *pc) 2591 | call extern lj_dispatch_ins@8 // (lua_State *L, const BCIns *pc)
2592 |3: 2592 |3:
2593 | mov BASE, L:RB->base 2593 | mov BASE, L:RB->base
2594 |4: 2594 |4:
@@ -2659,6 +2659,19 @@ static void build_subroutines(BuildCtx *ctx)
2659 | add NARGS:RD, 1 2659 | add NARGS:RD, 1
2660 | jmp RBa 2660 | jmp RBa
2661 | 2661 |
2662 |->vm_profhook: // Dispatch target for profiler hook.
2663#if LJ_HASPROFILE
2664 | mov L:RB, SAVE_L
2665 | mov L:RB->base, BASE
2666 | mov FCARG2, PC // Caveat: FCARG2 == BASE
2667 | mov FCARG1, L:RB
2668 | call extern lj_dispatch_profile@8 // (lua_State *L, const BCIns *pc)
2669 | mov BASE, L:RB->base
2670 | // HOOK_PROFILE is off again, so re-dispatch to dynamic instruction.
2671 | sub PC, 4
2672 | jmp ->cont_nop
2673#endif
2674 |
2662 |//----------------------------------------------------------------------- 2675 |//-----------------------------------------------------------------------
2663 |//-- Trace exit handler ------------------------------------------------- 2676 |//-- Trace exit handler -------------------------------------------------
2664 |//----------------------------------------------------------------------- 2677 |//-----------------------------------------------------------------------