aboutsummaryrefslogtreecommitdiff
path: root/src/lj_asm_mips.h
diff options
context:
space:
mode:
authorMike Pall <mike>2013-09-08 02:53:23 +0200
committerMike Pall <mike>2013-09-08 02:53:23 +0200
commitd1194a82eb24afa1c749a0a8080b67d168f9f201 (patch)
treefb3bebc2cbf5032a49653dd6a0bd31c420dd8083 /src/lj_asm_mips.h
parentd3d30d389b504495d054d71bdee0fe2677d4b44c (diff)
downloadluajit-d1194a82eb24afa1c749a0a8080b67d168f9f201.tar.gz
luajit-d1194a82eb24afa1c749a0a8080b67d168f9f201.tar.bz2
luajit-d1194a82eb24afa1c749a0a8080b67d168f9f201.zip
Low-overhead profiler, part 4: JIT compiler support.
Diffstat (limited to 'src/lj_asm_mips.h')
-rw-r--r--src/lj_asm_mips.h11
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
1567static 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. */