Search
lxdream.org :: lxdream/src/sh4/shadow.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/shadow.c
changeset 1198:407659e01ef0
prev1194:ee6ce5804608
next1201:5502572ce192
author Nathan Keynes <nkeynes@lxdream.org>
date Fri Dec 16 10:08:45 2011 +1000 (8 years ago)
permissions -rw-r--r--
last change Add volatile qualifier to return-address frobbing - works around optimizer
bug in GCC versions after 4.2
file annotate diff log raw
1.1 --- a/src/sh4/shadow.c Mon Dec 12 21:13:36 2011 +1000
1.2 +++ b/src/sh4/shadow.c Fri Dec 16 10:08:45 2011 +1000
1.3 @@ -31,7 +31,7 @@
1.4 #ifdef HAVE_FRAME_ADDRESS
1.5 static FASTCALL __attribute__((noinline)) void *__first_arg(void *a, void *b) { return a; }
1.6 #define INIT_EXCEPTIONS(label) goto *__first_arg(&&fnstart,&&label); fnstart:
1.7 -#define EXCEPTION_EXIT(exc) do{ *(((void **)__builtin_frame_address(0))+1) = exc; } while(0)
1.8 +#define EXCEPTION_EXIT(exc) do{ *(((void * volatile *)__builtin_frame_address(0))+1) = exc; } while(0)
1.9 #else
1.10 #define INIT_EXCEPTIONS(label)
1.11 #define EXCEPTION_EXIT() sh4_core_exit(CORE_EXIT_EXCEPTION)
.