#define CLOBBER_BT clobber_flags()
#define CLOBBER_BSF clobber_flags()
+/* The older code generator is now deprecated. */
+#define USE_NEW_RTASM 0
#if USE_NEW_RTASM
static void jit_fail(const char *msg, const char *file, int line, const char *function)
{
- panicbug("JIT failure in function %s from file %s at line %d: %s",
+ jit_abort("failure in function %s from file %s at line %d: %s",
function, file, line, msg);
- abort();
}
LOWFUNC(NONE,WRITE,1,raw_push_l_r,(R4 r))
if (have_cmov)
CMOVLrr(cc, s, d);
else { /* replacement using branch and mov */
- int8 *target_p = (int8 *)x86_get_target() + 1;
+ uae_s8 *target_p = (uae_s8 *)x86_get_target() + 1;
JCCSii(cc^1, 0);
MOVLrr(s, d);
*target_p = (uintptr)x86_get_target() - ((uintptr)target_p + 1);
if (have_cmov)
ADDR32 CMOVLmr(cond, base, X86_NOREG, index, factor, d);
else { /* replacement using branch and mov */
- int8 *target_p = (int8 *)x86_get_target() + 1;
+ uae_s8 *target_p = (uae_s8 *)x86_get_target() + 1;
JCCSii(cond^1, 0);
ADDR32 MOVLmr(base, X86_NOREG, index, factor, d);
*target_p = (uintptr)x86_get_target() - ((uintptr)target_p + 1);
if (have_cmov)
CMOVLmr(cond, mem, X86_NOREG, X86_NOREG, 1, d);
else { /* replacement using branch and mov */
- int8 *target_p = (int8 *)x86_get_target() + 1;
+ uae_s8 *target_p = (uae_s8 *)x86_get_target() + 1;
JCCSii(cond^1, 0);
MOVLmr(mem, X86_NOREG, X86_NOREG, 1, d);
*target_p = (uintptr)x86_get_target() - ((uintptr)target_p + 1);
raw_zero_extend_16_rr(rr,rr);
raw_zero_extend_16_rr(bestreg,bestreg);
raw_bswap_32(bestreg);
- raw_lea_l_rr_indexed(rr,rr,bestreg);
+ raw_lea_l_brr_indexed(rr,rr,bestreg,1,0);
live.state[r].validsize=4;
live.nat[rr].touched=touchcnt++;
return rr;
else { /* 68000 version */
if ((dp & 0x800) == 0) { /* Sign extend */
sign_extend_16_rr(target,reg);
+#if USE_NEW_RTASM
+ lea_l_brr_indexed(target,base,target,1<<regd_shift,(uae_s32)((uae_s8)dp));
+#else
lea_l_brr_indexed(target,base,target,regd_shift,(uae_s32)((uae_s8)dp));
+#endif
}
else {
+#if USE_NEW_RTASM
+ lea_l_brr_indexed(target,base,reg,1<<regd_shift,(uae_s32)((uae_s8)dp));
+#else
lea_l_brr_indexed(target,base,reg,regd_shift,(uae_s32)((uae_s8)dp));
+#endif
}
}
forget_about(tmp);
int r2 = (r==0) ? 1 : 0;
raw_mov_l_ri(r2,(uintptr)popall_do_nothing);
raw_sub_l_mi((uae_u32)&countdown,scaled_cycles(totcycles));
- raw_cmov_l_rm_indexed(r2,(uae_u32)cache_tags,r,9);
+#if USE_NEW_RTASM
+ raw_cmov_l_rm_indexed(r2,(uintptr)cache_tags,r,SIZEOF_VOID_P,9);
+#else
+ raw_cmov_l_rm_indexed(r2,(uintptr)cache_tags,r,9);
+#endif
raw_jmp_r(r2);
}
else if (was_comp && isconst(PC_P)) {
int r2 = (r==0) ? 1 : 0;
raw_mov_l_ri(r2,(uintptr)popall_do_nothing);
raw_sub_l_mi((uae_u32)&countdown,scaled_cycles(totcycles));
+#if USE_NEW_RTASM
+ raw_cmov_l_rm_indexed(r2,(uintptr)cache_tags,r,SIZEOF_VOID_P,9);
+#else
raw_cmov_l_rm_indexed(r2,(uintptr)cache_tags,r,9);
+#endif
raw_jmp_r(r2);
}
}