aboutsummaryrefslogtreecommitdiff
path: root/src/lj_target_ppc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_target_ppc.h')
-rw-r--r--src/lj_target_ppc.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lj_target_ppc.h b/src/lj_target_ppc.h
index f754a8d3..d8fbea6d 100644
--- a/src/lj_target_ppc.h
+++ b/src/lj_target_ppc.h
@@ -112,13 +112,14 @@ typedef struct {
112#define EXITSTATE_CHECKEXIT 1 112#define EXITSTATE_CHECKEXIT 1
113 113
114/* Return the address of a per-trace exit stub. */ 114/* Return the address of a per-trace exit stub. */
115static LJ_AINLINE MCode *exitstub_trace_addr(GCtrace *T, ExitNo exitno) 115static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno)
116{ 116{
117 /* Keep this in-sync with asm_exitstub_*. */
118 MCode *p = (MCode *)((char *)T->mcode + T->szmcode);
119 while (*p == 0x60000000) p++; /* Skip PPCI_NOP. */ 117 while (*p == 0x60000000) p++; /* Skip PPCI_NOP. */
120 return p + 3 + exitno; 118 return p + 3 + exitno;
121} 119}
120/* Avoid dependence on lj_jit.h if only including lj_target.h. */
121#define exitstub_trace_addr(T, exitno) \
122 exitstub_trace_addr_((MCode *)((char *)(T)->mcode + (T)->szmcode), (exitno))
122 123
123/* -- Instructions -------------------------------------------------------- */ 124/* -- Instructions -------------------------------------------------------- */
124 125