From 9984a819064cccb05090c3b38970fdceb5a40eb4 Mon Sep 17 00:00:00 2001 From: David Guillen Fandos Date: Mon, 16 Aug 2021 18:01:58 +0200 Subject: [PATCH] Fix SH2 DRC for x86 (32 bit) builds Turns out it doesn't work on my machine, perhaps due to newer gcc being... unlucky! See issue #27 for more info. Also, this fixes issue #27. --- pico/32x/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pico/32x/memory.c b/pico/32x/memory.c index d49cd2a5..fe7bc078 100644 --- a/pico/32x/memory.c +++ b/pico/32x/memory.c @@ -1868,7 +1868,7 @@ static void REGPARM(3) sh2_write32_rom(u32 a, u32 d, SH2 *sh2) sh2_write16_rom(a + 2, d, sh2); } -typedef u32 (sh2_read_handler)(u32 a, SH2 *sh2); +typedef u32 REGPARM(2) (sh2_read_handler)(u32 a, SH2 *sh2); typedef void REGPARM(3) (sh2_write_handler)(u32 a, u32 d, SH2 *sh2); #define SH2MAP_ADDR2OFFS_R(a) \ -- 2.39.5