From: kub Date: Thu, 17 Oct 2019 22:16:54 +0000 (+0200) Subject: fix gp2x regression X-Git-Tag: v2.00~819 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1fd8f98696080abb6a8463eb84a1a371d0389e68;p=picodrive.git fix gp2x regression --- diff --git a/cpu/sh2/compiler.c b/cpu/sh2/compiler.c index 1acc7215..b2306cf2 100644 --- a/cpu/sh2/compiler.c +++ b/cpu/sh2/compiler.c @@ -1248,7 +1248,7 @@ static void dr_activate_block(struct block_desc *bd, int tcache_id, int is_slave bd->active = 1; } -static void REGPARM(3) ALIGNED(32) *dr_lookup_block(u32 pc, SH2 *sh2, int *tcache_id) +static void REGPARM(3) *dr_lookup_block(u32 pc, SH2 *sh2, int *tcache_id) { struct block_entry *be = NULL; void *block = NULL; diff --git a/cpu/sh2/sh2.h b/cpu/sh2/sh2.h index 57693ac1..05ae7052 100644 --- a/cpu/sh2/sh2.h +++ b/cpu/sh2/sh2.h @@ -13,7 +13,7 @@ typedef enum { typedef struct SH2_ { // registers. this MUST correlate with enum sh2_reg_e. - unsigned int r[16]; // 00 + unsigned int r[16] ALIGNED(32); unsigned int pc; // 40 unsigned int ppc; unsigned int pr; @@ -80,7 +80,7 @@ typedef struct SH2_ unsigned char data_array[0x1000]; // cache (can be used as RAM) unsigned int peri_regs[0x200/4]; // periphereal regs -} SH2 ALIGNED(32); +} SH2; #define CYCLE_MULT_SHIFT 10 #define C_M68K_TO_SH2(xsh2, c) \ diff --git a/tools/mkoffsets.sh b/tools/mkoffsets.sh index 2223b804..8a0557c7 100755 --- a/tools/mkoffsets.sh +++ b/tools/mkoffsets.sh @@ -48,7 +48,7 @@ get_define () # prefix struct member member... line=$(printf "#define %-20s 0x%04x" $prefix$name $rodata) } -CFLAGS="$CFLAGS -fno-lto" +if echo $CFLAGS | grep -qe -flto; then CFLAGS="$CFLAGS -fno-lto"; fi # determine endianess echo "const int val = 1;" >/tmp/getoffs.c compile_rodata