simpler solution to regparm problem

This commit is contained in:
notaz 2013-08-15 02:46:16 +03:00
parent e4455c2342
commit 8b43bc737b
2 changed files with 5 additions and 5 deletions

View file

@ -294,7 +294,7 @@ void REGPARM(3) sh2_peripheral_write16(u32 a, u32 d, SH2 *sh2)
r[(a / 2) ^ 1] = d; 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; u32 *r = sh2->peri_regs;
elprintf(EL_32XP, "%csh2 peri w32 [%08x] %08x @%06x", elprintf(EL_32XP, "%csh2 peri w32 [%08x] %08x @%06x",

View file

@ -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_read8(unsigned int a, SH2 *sh2);
unsigned int sh2_peripheral_read16(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); unsigned int sh2_peripheral_read32(unsigned int a, SH2 *sh2);
void sh2_peripheral_write8(unsigned int a, unsigned int d, SH2 *sh2); void REGPARM(3) sh2_peripheral_write8(unsigned int a, unsigned int d, SH2 *sh2);
void sh2_peripheral_write16(unsigned int a, unsigned int d, SH2 *sh2); void REGPARM(3) 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_write32(unsigned int a, unsigned int d, SH2 *sh2);
#else #else
#define Pico32xInit() #define Pico32xInit()
@ -926,7 +926,7 @@ void pevt_dump(void);
#define cdprintf(x...) #define cdprintf(x...)
#endif #endif
#ifdef __i386__ #if defined(__GNUC__) && defined(__i386__)
#define REGPARM(x) __attribute__((regparm(x))) #define REGPARM(x) __attribute__((regparm(x)))
#else #else
#define REGPARM(x) #define REGPARM(x)