diff options
Diffstat (limited to 'src/vm_mips.dasc')
-rw-r--r-- | src/vm_mips.dasc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/vm_mips.dasc b/src/vm_mips.dasc index 39d1521d..e7d01dc4 100644 --- a/src/vm_mips.dasc +++ b/src/vm_mips.dasc | |||
@@ -2011,6 +2011,20 @@ static void build_subroutines(BuildCtx *ctx) | |||
2011 | | jr CRET1 | 2011 | | jr CRET1 |
2012 | |. lw INS, -4(PC) | 2012 | |. lw INS, -4(PC) |
2013 | | | 2013 | | |
2014 | |->vm_profhook: // Dispatch target for profiler hook. | ||
2015 | #if LJ_HASPROFILE | ||
2016 | | load_got lj_dispatch_profile | ||
2017 | | sw MULTRES, SAVE_MULTRES | ||
2018 | | move CARG2, PC | ||
2019 | | sw BASE, L->base | ||
2020 | | call_intern lj_dispatch_profile // (lua_State *L, const BCIns *pc) | ||
2021 | |. move CARG1, L | ||
2022 | | // HOOK_PROFILE is off again, so re-dispatch to dynamic instruction. | ||
2023 | | addiu PC, PC, -4 | ||
2024 | | b ->cont_nop | ||
2025 | |. lw BASE, L->base | ||
2026 | #endif | ||
2027 | | | ||
2014 | |//----------------------------------------------------------------------- | 2028 | |//----------------------------------------------------------------------- |
2015 | |//-- Trace exit handler ------------------------------------------------- | 2029 | |//-- Trace exit handler ------------------------------------------------- |
2016 | |//----------------------------------------------------------------------- | 2030 | |//----------------------------------------------------------------------- |