From: notaz Date: Wed, 14 Aug 2013 23:46:16 +0000 (+0300) Subject: simpler solution to regparm problem X-Git-Tag: v1.85~4 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b43bc737beced9427e5ad1b0a605cb1d41c93bd;p=picodrive.git simpler solution to regparm problem --- diff --git a/pico/32x/sh2soc.c b/pico/32x/sh2soc.c index bdd07a04..373dd478 100644 --- a/pico/32x/sh2soc.c +++ b/pico/32x/sh2soc.c @@ -294,7 +294,7 @@ void REGPARM(3) sh2_peripheral_write16(u32 a, u32 d, SH2 *sh2) r[(a / 2) ^ 1] = d; } -void sh2_peripheral_write32(u32 a, u32 d, SH2 *sh2) +void REGPARM(3) sh2_peripheral_write32(u32 a, u32 d, SH2 *sh2) { u32 *r = sh2->peri_regs; elprintf(EL_32XP, "%csh2 peri w32 [%08x] %08x @%06x", diff --git a/pico/pico_int.h b/pico/pico_int.h index 339d1bf1..fa99c5bc 100644 --- a/pico/pico_int.h +++ b/pico/pico_int.h @@ -796,9 +796,9 @@ void p32x_timers_do(unsigned int m68k_slice); unsigned int sh2_peripheral_read8(unsigned int a, SH2 *sh2); unsigned int sh2_peripheral_read16(unsigned int a, SH2 *sh2); unsigned int sh2_peripheral_read32(unsigned int a, SH2 *sh2); -void sh2_peripheral_write8(unsigned int a, unsigned int d, SH2 *sh2); -void sh2_peripheral_write16(unsigned int a, unsigned int d, SH2 *sh2); -void sh2_peripheral_write32(unsigned int a, unsigned int d, SH2 *sh2); +void REGPARM(3) sh2_peripheral_write8(unsigned int a, unsigned int d, SH2 *sh2); +void REGPARM(3) sh2_peripheral_write16(unsigned int a, unsigned int d, SH2 *sh2); +void REGPARM(3) sh2_peripheral_write32(unsigned int a, unsigned int d, SH2 *sh2); #else #define Pico32xInit() @@ -926,7 +926,7 @@ void pevt_dump(void); #define cdprintf(x...) #endif -#ifdef __i386__ +#if defined(__GNUC__) && defined(__i386__) #define REGPARM(x) __attribute__((regparm(x))) #else #define REGPARM(x)