Low-overhead profiler, part 4: JIT compiler support.
This commit is contained in:
@@ -1562,6 +1562,17 @@ static void asm_hiop(ASMState *as, IRIns *ir)
|
||||
#endif
|
||||
}
|
||||
|
||||
/* -- Profiling ----------------------------------------------------------- */
|
||||
|
||||
static void asm_prof(ASMState *as, IRIns *ir)
|
||||
{
|
||||
UNUSED(ir);
|
||||
asm_guard(as, MIPSI_BNE, RID_TMP, RID_ZERO);
|
||||
emit_tsi(as, MIPSI_ANDI, RID_TMP, RID_TMP, HOOK_PROFILE);
|
||||
emit_lsglptr(as, MIPSI_LBU, RID_TMP,
|
||||
(int32_t)offsetof(global_State, hookmask));
|
||||
}
|
||||
|
||||
/* -- Stack handling ------------------------------------------------------ */
|
||||
|
||||
/* Check Lua stack size for overflow. Use exit handler as fallback. */
|
||||
|
||||
Reference in New Issue
Block a user