summaryrefslogtreecommitdiff
path: root/src/lj_jit.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_jit.h')
-rw-r--r--src/lj_jit.h19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/lj_jit.h b/src/lj_jit.h
index 1cf63448..dd74dedb 100644
--- a/src/lj_jit.h
+++ b/src/lj_jit.h
@@ -258,13 +258,6 @@ enum {
258#define lj_resetsplit(J) UNUSED(J) 258#define lj_resetsplit(J) UNUSED(J)
259#endif 259#endif
260 260
261/* Exit stubs. */
262#if LJ_TARGET_X86ORX64
263/* Limited by the range of a short fwd jump (127): (2+2)*(32-1)-2 = 122. */
264#define EXITSTUB_SPACING (2+2)
265#define EXITSTUBS_PER_GROUP 32
266#endif
267
268/* Fold state is used to fold instructions on-the-fly. */ 261/* Fold state is used to fold instructions on-the-fly. */
269typedef struct FoldState { 262typedef struct FoldState {
270 IRIns ins; /* Currently emitted instruction. */ 263 IRIns ins; /* Currently emitted instruction. */
@@ -331,9 +324,7 @@ typedef struct jit_State {
331 324
332 int32_t param[JIT_P__MAX]; /* JIT engine parameters. */ 325 int32_t param[JIT_P__MAX]; /* JIT engine parameters. */
333 326
334#if LJ_TARGET_X86ORX64
335 MCode *exitstubgroup[LJ_MAX_EXITSTUBGR]; /* Exit stub group addresses. */ 327 MCode *exitstubgroup[LJ_MAX_EXITSTUBGR]; /* Exit stub group addresses. */
336#endif
337 328
338 HotPenalty penalty[PENALTY_SLOTS]; /* Penalty slots. */ 329 HotPenalty penalty[PENALTY_SLOTS]; /* Penalty slots. */
339 uint32_t penaltyslot; /* Round-robin index into penalty slots. */ 330 uint32_t penaltyslot; /* Round-robin index into penalty slots. */
@@ -369,14 +360,4 @@ static LJ_AINLINE uint32_t LJ_PRNG_BITS(jit_State *J, int bits)
369 return J->prngstate >> (32-bits); 360 return J->prngstate >> (32-bits);
370} 361}
371 362
372#ifdef EXITSTUBS_PER_GROUP
373/* Return the address of an exit stub. */
374static LJ_AINLINE MCode *exitstub_addr(jit_State *J, ExitNo exitno)
375{
376 lua_assert(J->exitstubgroup[exitno / EXITSTUBS_PER_GROUP] != NULL);
377 return (MCode *)((char *)J->exitstubgroup[exitno / EXITSTUBS_PER_GROUP] +
378 EXITSTUB_SPACING*(exitno % EXITSTUBS_PER_GROUP));
379}
380#endif
381
382#endif 363#endif