aboutsummaryrefslogtreecommitdiff
path: root/src/lj_mcode.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lj_mcode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lj_mcode.c b/src/lj_mcode.c
index a33a4c5d..0f29a3ce 100644
--- a/src/lj_mcode.c
+++ b/src/lj_mcode.c
@@ -206,7 +206,7 @@ static void mcode_protect(jit_State *J, int prot)
206 206
207#if LJ_TARGET_X64 207#if LJ_TARGET_X64
208#define mcode_validptr(p) ((p) && (uintptr_t)(p) < (uintptr_t)1<<47) 208#define mcode_validptr(p) ((p) && (uintptr_t)(p) < (uintptr_t)1<<47)
209#elif LJ_TARGET_ARM64 209#elif LJ_TARGET_ARM64 || LJ_TARGET_MIPS64
210/* We have no clue about the valid VA range. It could be 39 - 52 bits. */ 210/* We have no clue about the valid VA range. It could be 39 - 52 bits. */
211#define mcode_validptr(p) (p) 211#define mcode_validptr(p) (p)
212#else 212#else
@@ -224,8 +224,8 @@ static void *mcode_alloc(jit_State *J, size_t sz)
224 */ 224 */
225#if LJ_TARGET_MIPS 225#if LJ_TARGET_MIPS
226 /* Use the middle of the 256MB-aligned region. */ 226 /* Use the middle of the 256MB-aligned region. */
227 uintptr_t target = ((uintptr_t)(void *)lj_vm_exit_handler & 0xf0000000u) + 227 uintptr_t target = ((uintptr_t)(void *)lj_vm_exit_handler &
228 0x08000000u; 228 ~(uintptr_t)0x0fffffffu) + 0x08000000u;
229#else 229#else
230 uintptr_t target = (uintptr_t)(void *)lj_vm_exit_handler & ~(uintptr_t)0xffff; 230 uintptr_t target = (uintptr_t)(void *)lj_vm_exit_handler & ~(uintptr_t)0xffff;
231#endif 231#endif