}
MENDFUNC(0,duplicate_carry,(void))
+MIDFUNC(0, setcc_for_cntzero, (RR4))
+{
+ uae_u8 * branchadd;
+
+ evict(FLAGX);
+ make_flags_live_internal();
+
+ raw_pushfl();
+ /*
+ * shift count can only be in CL register; see shrl_b_rr
+ */
+ raw_test_b_rr(X86_CL, X86_CL);
+ /* if zero, leave X unaffected; carry flag will already be cleared */
+ raw_jz_b_oponly();
+ branchadd = get_target();
+ skip_byte();
+ raw_popfl();
+ raw_pushfl();
+#ifdef UAE
+ COMPCALL(setcc_m)((uintptr)live.state[FLAGX].mem + 1, NATIVE_CC_CS);
+#else
+ COMPCALL(setcc_m)((uintptr)live.state[FLAGX].mem, NATIVE_CC_CS);
+#endif
+ log_vwrite(FLAGX);
+ *branchadd = (uintptr)get_target() - ((uintptr)branchadd + 1);
+ raw_popfl();
+}
+
MIDFUNC(0,restore_carry,(void))
{
if (!have_rat_stall) { /* Not a P6 core, i.e. no partial stalls */
DECLARE_MIDFUNC(live_flags(void));
DECLARE_MIDFUNC(dont_care_flags(void));
DECLARE_MIDFUNC(duplicate_carry(void));
+DECLARE_MIDFUNC(setcc_for_cntzero(RR4 d));
DECLARE_MIDFUNC(restore_carry(void));
DECLARE_MIDFUNC(start_needflags(void));
DECLARE_MIDFUNC(end_needflags(void));
#endif
#ifdef PROFILE_UNTRANSLATED_INSNS
-static const int untranslated_top_ten = 20;
+static const int untranslated_top_ten = 50;
static uae_u32 raw_cputbl_count[65536] = { 0, };
static uae_u16 opcode_nums[65536];
opcode_nums[i] = i;
untranslated_count += raw_cputbl_count[i];
}
- jit_log("Sorting out untranslated instructions count...");
+ bug("Sorting out untranslated instructions count...");
qsort(opcode_nums, 65536, sizeof(uae_u16), untranslated_compfn);
jit_log("Rank Opc Count Name");
for (int i = 0; i < untranslated_top_ten; i++) {
dp = table68k + opcode_nums[i];
for (lookup = lookuptab; lookup->mnemo != (instrmnem)dp->mnemo; lookup++)
;
- jit_log("%03d: %04x %10u %s", i, opcode_nums[i], count, lookup->name);
+ bug("%03d: %04x %10u %s", i, opcode_nums[i], count, lookup->name);
}
#endif