summaryrefslogtreecommitdiff
path: root/src/lj_target.h
diff options
context:
space:
mode:
authorMike Pall <mike>2011-05-16 19:31:07 +0200
committerMike Pall <mike>2011-05-16 19:32:47 +0200
commitfb46370e561bb74cca908980531b6092a34cf673 (patch)
tree33035a8fda14480408240e2115d863297969e744 /src/lj_target.h
parentdab4bcafba789c7954dc4f90623c81365dcedb7f (diff)
downloadluajit2-fb46370e561bb74cca908980531b6092a34cf673.tar.gz
Cleanup of target dependencies.
Diffstat (limited to 'src/lj_target.h')
-rw-r--r--src/lj_target.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lj_target.h b/src/lj_target.h
index 8c91bf7e..bfa1c9f0 100644
--- a/src/lj_target.h
+++ b/src/lj_target.h
@@ -129,4 +129,12 @@ typedef uint32_t RegCost;
#error "Missing include for target CPU"
#endif
+/* Return the address of an exit stub. */
+static LJ_AINLINE MCode *exitstub_addr(jit_State *J, ExitNo exitno)
+{
+ lua_assert(J->exitstubgroup[exitno / EXITSTUBS_PER_GROUP] != NULL);
+ return (MCode *)((char *)J->exitstubgroup[exitno / EXITSTUBS_PER_GROUP] +
+ EXITSTUB_SPACING*(exitno % EXITSTUBS_PER_GROUP));
+}
+
#endif