aboutsummaryrefslogtreecommitdiff
path: root/src/lj_target_arm64.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_target_arm64.h')
-rw-r--r--src/lj_target_arm64.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h
index 0cef06d5..1cd02fe8 100644
--- a/src/lj_target_arm64.h
+++ b/src/lj_target_arm64.h
@@ -101,14 +101,18 @@ typedef struct {
101 int32_t spill[256]; /* Spill slots. */ 101 int32_t spill[256]; /* Spill slots. */
102} ExitState; 102} ExitState;
103 103
104/* PC after instruction that caused an exit. Used to find the trace number. */
105#define EXITSTATE_PCREG RID_LR
106/* Highest exit + 1 indicates stack check. */ 104/* Highest exit + 1 indicates stack check. */
107#define EXITSTATE_CHECKEXIT 1 105#define EXITSTATE_CHECKEXIT 1
108 106
109#define EXITSTUB_SPACING 4 107/* Return the address of a per-trace exit stub. */
110#define EXITSTUBS_PER_GROUP 32 108static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
111 109{
110 while (*p == 0xd503201f) p++; /* Skip A64I_NOP. */
111 return p + 3 + exitno;
112}
113/* Avoid dependence on lj_jit.h if only including lj_target.h. */
114#define exitstub_trace_addr(T, exitno) \
115 exitstub_trace_addr_((MCode *)((char *)(T)->mcode + (T)->szmcode), (exitno))
112 116
113/* -- Instructions -------------------------------------------------------- */ 117/* -- Instructions -------------------------------------------------------- */
114 118