From: kub Date: Mon, 14 Dec 2020 20:05:51 +0000 (+0100) Subject: 32x, tiny optimization for memory access X-Git-Tag: v2.00~637 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0d5c83fd319516d3c0efbcf281ef8a8cc74a6b5;p=picodrive.git 32x, tiny optimization for memory access --- diff --git a/cpu/drc/emit_mips.c b/cpu/drc/emit_mips.c index edc23043..41544ca1 100644 --- a/cpu/drc/emit_mips.c +++ b/cpu/drc/emit_mips.c @@ -384,7 +384,7 @@ static int emith_rd(u32 op) ret = emith_has_(rd,2,op, 0,0x3f) ? (op>>16)&0x1f :-1; if ((op>>26) == OP__RT) ret = -1; - return (ret ?: -1); // Z0 doesn't have dependencies + return (ret ? ret : -1); // Z0 doesn't have dependencies } static int emith_b_isswap(u32 bop, u32 lop) diff --git a/pico/32x/memory.c b/pico/32x/memory.c index 2e9f590e..200ad91d 100644 --- a/pico/32x/memory.c +++ b/pico/32x/memory.c @@ -163,7 +163,7 @@ void NOINLINE p32x_sh2_poll_event(SH2 *sh2, u32 flags, u32 m68k_cycles) sh2->poll_addr = sh2->poll_cycles = sh2->poll_cnt = 0; } -static void sh2s_sync_on_read(SH2 *sh2, unsigned cycles) +static NOINLINE void sh2s_sync_on_read(SH2 *sh2, unsigned cycles) { if (sh2->poll_cnt != 0) return; @@ -1587,13 +1587,13 @@ static void sh2_sdram_poll(u32 a, u32 d, SH2 *sh2) DRC_RESTORE_SR(sh2); } -void sh2_sdram_checks(u32 a, u32 d, SH2 *sh2, u32 t) +void NOINLINE sh2_sdram_checks(u32 a, u32 d, SH2 *sh2, u32 t) { if (t & 0x80) sh2_sdram_poll(a, d, sh2); if (t & 0x7f) sh2_drc_wcheck_ram(a, 2, sh2); } -void sh2_sdram_checks_l(u32 a, u32 d, SH2 *sh2, u32 t) +void NOINLINE sh2_sdram_checks_l(u32 a, u32 d, SH2 *sh2, u32 t) { if (t & 0x000080) sh2_sdram_poll(a, d>>16, sh2); if (t & 0x800000) sh2_sdram_poll(a+2, d, sh2);