aboutsummaryrefslogtreecommitdiff
path: root/src/lj_target.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_target.h')
-rw-r--r--src/lj_target.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lj_target.h b/src/lj_target.h
index a80cc027..c302d301 100644
--- a/src/lj_target.h
+++ b/src/lj_target.h
@@ -144,12 +144,15 @@ typedef uint32_t RegCost;
144 144
145#ifdef EXITSTUBS_PER_GROUP 145#ifdef EXITSTUBS_PER_GROUP
146/* Return the address of an exit stub. */ 146/* Return the address of an exit stub. */
147static LJ_AINLINE MCode *exitstub_addr(jit_State *J, ExitNo exitno) 147static LJ_AINLINE char *exitstub_addr_(char **group, uint32_t exitno)
148{ 148{
149 lua_assert(J->exitstubgroup[exitno / EXITSTUBS_PER_GROUP] != NULL); 149 lua_assert(group[exitno / EXITSTUBS_PER_GROUP] != NULL);
150 return (MCode *)((char *)J->exitstubgroup[exitno / EXITSTUBS_PER_GROUP] + 150 return (char *)group[exitno / EXITSTUBS_PER_GROUP] +
151 EXITSTUB_SPACING*(exitno % EXITSTUBS_PER_GROUP)); 151 EXITSTUB_SPACING*(exitno % EXITSTUBS_PER_GROUP);
152} 152}
153/* Avoid dependence on lj_jit.h if only including lj_target.h. */
154#define exitstub_addr(J, exitno) \
155 ((MCode *)exitstub_addr_((char **)((J)->exitstubgroup), (exitno)))
153#endif 156#endif
154 157
155#endif 158#endif