From: kub Date: Sat, 25 Apr 2020 19:51:47 +0000 (+0200) Subject: sh2: bugfix in drc X-Git-Tag: v2.00~741 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4321a689a5eb7159dfbc7c572c2f93998cf90784;p=picodrive.git sh2: bugfix in drc --- diff --git a/cpu/sh2/compiler.c b/cpu/sh2/compiler.c index 04320424..ad1983bf 100644 --- a/cpu/sh2/compiler.c +++ b/cpu/sh2/compiler.c @@ -160,7 +160,7 @@ enum op_types { & BITMASK1(op)) #define OP_ISBRAUC(op) (BITMASK4(OP_BRANCH, OP_BRANCH_R, OP_BRANCH_RF, OP_RTE) \ & BITMASK1(op)) -#define OP_ISBRACND(op) (BITMASK3(OP_BRANCH_CT, OP_BRANCH_CF, OP_BRANCH_N) \ +#define OP_ISBRACND(op) (BITMASK2(OP_BRANCH_CT, OP_BRANCH_CF) \ & BITMASK1(op)) #define OP_ISBRAIMM(op) (BITMASK3(OP_BRANCH, OP_BRANCH_CT, OP_BRANCH_CF) \ & BITMASK1(op)) @@ -3501,7 +3501,7 @@ static void REGPARM(2) *sh2_translate(SH2 *sh2, int tcache_id) rcache_set_usage_now(opd[0].source); // current insn rcache_set_usage_soon(soon); // insns 1-4 rcache_set_usage_late(late & ~soon); // insns 5-9 - rcache_set_usage_discard(write & ~(late|soon)); + rcache_set_usage_discard(write & ~(late|soon|opd[0].source)); if (v <= 9) // upcoming rcache_flush, start writing back unused dirty stuff rcache_clean_masked(rcache_dirty_mask() & ~(write|opd[0].dest));