diff options
Diffstat (limited to 'src/lj_asm_mips.h')
-rw-r--r-- | src/lj_asm_mips.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lj_asm_mips.h b/src/lj_asm_mips.h index 74eff10b..365538bb 100644 --- a/src/lj_asm_mips.h +++ b/src/lj_asm_mips.h | |||
@@ -1562,6 +1562,17 @@ static void asm_hiop(ASMState *as, IRIns *ir) | |||
1562 | #endif | 1562 | #endif |
1563 | } | 1563 | } |
1564 | 1564 | ||
1565 | /* -- Profiling ----------------------------------------------------------- */ | ||
1566 | |||
1567 | static void asm_prof(ASMState *as, IRIns *ir) | ||
1568 | { | ||
1569 | UNUSED(ir); | ||
1570 | asm_guard(as, MIPSI_BNE, RID_TMP, RID_ZERO); | ||
1571 | emit_tsi(as, MIPSI_ANDI, RID_TMP, RID_TMP, HOOK_PROFILE); | ||
1572 | emit_lsglptr(as, MIPSI_LBU, RID_TMP, | ||
1573 | (int32_t)offsetof(global_State, hookmask)); | ||
1574 | } | ||
1575 | |||
1565 | /* -- Stack handling ------------------------------------------------------ */ | 1576 | /* -- Stack handling ------------------------------------------------------ */ |
1566 | 1577 | ||
1567 | /* Check Lua stack size for overflow. Use exit handler as fallback. */ | 1578 | /* Check Lua stack size for overflow. Use exit handler as fallback. */ |