From: kub Date: Wed, 16 Jun 2021 21:07:22 +0000 (+0200) Subject: sh2 drc, some small cleanups X-Git-Tag: v2.00~508 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5275d43aaab913682554402a4d95011ecd424ce0;p=picodrive.git sh2 drc, some small cleanups --- diff --git a/cpu/sh2/compiler.c b/cpu/sh2/compiler.c index 08b2c80f..549e4763 100644 --- a/cpu/sh2/compiler.c +++ b/cpu/sh2/compiler.c @@ -68,7 +68,6 @@ // 200 - compare trace // 400 - block entry backtrace on exit // 800 - state dump on exit -// { #ifndef DRC_DEBUG #define DRC_DEBUG 0//x847 #endif @@ -218,7 +217,7 @@ static void REGPARM(3) *sh2_drc_log_entry(void *block, SH2 *sh2, u32 sr) if (block != NULL) { #if defined PDB dbg(8, "= %csh2 enter %08x %p, c=%d", sh2->is_slave?'s':'m', - sh2->pc, block, (signed int)sr >> 12); + sh2->pc, block, ((signed int)sr >> 12)+1); pdb_step(sh2, sh2->pc); #elif (DRC_DEBUG & 8) if (lastpc != sh2->pc) { @@ -2612,10 +2611,6 @@ static uptr split_address(uptr la, uptr mask, s32 *offs) uptr sign = (mask>>1) + 1; // sign bit in offset *offs = (la & mask) | (la & sign ? ~mask : 0); // offset part, sign extended la = (la & ~mask) + ((la & sign) << 1); // base part, corrected for offs sign - if (~mask && la == ~mask && *offs > 0) { // special case la=-1&~mask && offs>0 - *offs -= mask+1; - la = 0; - } return la; } @@ -5013,7 +5008,7 @@ end_op: // can't resolve branch locally, make a block exit bl = dr_prepare_ext_branch(block->entryp, target_pc, sh2->is_slave, tcache_id); if (cond != -1) { -#if 1 +#ifndef __arm__ if (bl && blx_target_count < ARRAY_SIZE(blx_targets)) { // conditional jumps get a blx stub for the far jump bl->type = BL_JCCBLX;