void
_jit_patch_abs(jit_state_t *_jit, jit_node_t *instr, jit_pointer_t address)
{
+#ifndef NDEBUG
jit_int32_t mask;
-
+#endif
switch (instr->code) {
case jit_code_movi: case jit_code_ldi_c: case jit_code_ldi_uc:
case jit_code_ldi_s: case jit_code_ldi_us: case jit_code_ldi_i:
instr->u.p = address;
break;
default:
+#ifndef NDEBUG
mask = jit_classify(instr->code);
+#endif
assert((mask & (jit_cc_a0_reg|jit_cc_a0_jmp)) == jit_cc_a0_jmp);
instr->u.p = address;
}
void
_jit_patch_at(jit_state_t *_jit, jit_node_t *instr, jit_node_t *label)
{
+#ifndef NDEBUG
jit_int32_t mask;
-
+#endif
assert(!(instr->flag & jit_flag_node));
instr->flag |= jit_flag_node;
switch (instr->code) {
instr->u.n = label;
break;
default:
+#ifndef NDEBUG
mask = jit_classify(instr->code);
+#endif
assert((mask & (jit_cc_a0_reg|jit_cc_a0_jmp)) == jit_cc_a0_jmp);
assert(label->code == jit_code_label);
instr->u.n = label;
jit_pointer_t code;
jit_node_t *node;
size_t length;
+#ifndef NDEBUG
int result;
+#endif
#if defined(__sgi)
int mmap_fd;
#endif
for (;;) {
#if __NetBSD__
- result = mprotect(_jit->code.ptr, _jit->code.length,
- PROT_READ | PROT_WRITE);
+#ifndef NDEBUG
+ result =
+#endif
+ mprotect(_jit->code.ptr, _jit->code.length, PROT_READ | PROT_WRITE);
assert(result == 0);
#endif
if ((code = emit_code()) == NULL) {
jit_free((jit_pointer_t *)&_jitc->data.ptr);
#if HAVE_MMAP
else {
- result = mprotect(_jit->data.ptr,
- _jit->data.length, PROT_READ);
+# ifndef NDEBUG
+ result =
+# endif
+ mprotect(_jit->data.ptr, _jit->data.length, PROT_READ);
assert(result == 0);
}
if (!_jit->user_code) {
/* FIXME should start adding consts at a page boundary */
_jit->code.protect -= _jitc->consts.hash.count * sizeof(jit_word_t);
# endif
- result = mprotect(_jit->code.ptr, _jit->code.protect, PROT_READ | PROT_EXEC);
+# ifndef NDEBUG
+ result =
+ mprotect(_jit->code.ptr, _jit->code.protect, PROT_READ | PROT_EXEC);
+# endif
assert(result == 0);
}
#endif /* HAVE_MMAP */
#if !HAVE_MMAP
assert (_jit->user_code);
#else
+# ifndef NDEBUG
int result;
+# endif
if (_jit->user_code) return;
- result = mprotect (_jit->code.ptr, _jit->code.protect, PROT_READ | PROT_EXEC);
+# ifndef NDEBUG
+ result =
+#endif
+ mprotect (_jit->code.ptr, _jit->code.protect, PROT_READ | PROT_EXEC);
assert (result == 0);
#endif
}
#if !HAVE_MMAP
assert (_jit->user_code);
#else
+# ifndef NDEBUG
int result;
+# endif
if (_jit->user_code) return;
- result = mprotect (_jit->code.ptr, _jit->code.protect, PROT_READ | PROT_WRITE);
+# ifndef NDEBUG
+ result =
+# endif
+ mprotect (_jit->code.ptr, _jit->code.protect, PROT_READ | PROT_WRITE);
assert (result == 0);
#endif
}
#endif
# define movi_f_w(r0, i0) _movi_f_w(_jit, r0, i0)
static void _movi_f_w(jit_state_t*, jit_int32_t, jit_float32_t);
-#if __WORDSIZE == 32
+#if __WORDSIZE == 32 && !(defined(__mips__) && NEW_ABI)
# define movi_d_ww(r0, r1, i0) _movi_d_ww(_jit, r0, r1, i0)
static void _movi_d_ww(jit_state_t*, jit_int32_t, jit_int32_t, jit_float64_t);
#else
movi(r0, data.i);
}
-#if __WORDSIZE == 32
+#if __WORDSIZE == 32 && !(defined(__mips__) && NEW_ABI)
static void
_movi_d_ww(jit_state_t *_jit, jit_int32_t r0, jit_int32_t r1, jit_float64_t i0)
{