mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-12 17:24:09 +00:00
PPC: Add dispatch target for call hook.
This commit is contained in:
parent
493d0aa259
commit
f635e3e5bb
@ -1182,12 +1182,32 @@ static void build_subroutines(BuildCtx *ctx)
|
||||
#endif
|
||||
|
|
||||
|->vm_callhook: // Dispatch target for call hooks.
|
||||
| NYI
|
||||
| mr CARG2, PC
|
||||
#if LJ_HASJIT
|
||||
| b >1
|
||||
#endif
|
||||
|
|
||||
|->vm_hotcall: // Hot call counter underflow.
|
||||
#if LJ_HASJIT
|
||||
| NYI
|
||||
| ori CARG2, PC, 1
|
||||
|1:
|
||||
#endif
|
||||
| add TMP0, BASE, RC
|
||||
| stw PC, SAVE_PC
|
||||
| mr CARG1, L
|
||||
| stw BASE, L->base
|
||||
| sub RA, RA, BASE
|
||||
| stw TMP0, L->top
|
||||
| bl extern lj_dispatch_call // (lua_State *L, const BCIns *pc)
|
||||
| // Returns ASMFunction.
|
||||
| lwz BASE, L->base
|
||||
| lwz TMP0, L->top
|
||||
| stw ZERO, SAVE_PC // Invalidate for subsequent line hook.
|
||||
| sub NARGS8:RC, TMP0, BASE
|
||||
| add RA, BASE, RA
|
||||
| lwz LFUNC:RB, FRAME_FUNC(BASE)
|
||||
| mtctr CRET1
|
||||
| bctr
|
||||
|
|
||||
|//-----------------------------------------------------------------------
|
||||
|//-- Trace exit handler -------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user