diff options
author | Thorkil Naur <naur@post11.tele.dk> | 2007-10-05 14:44:54 +0000 |
---|---|---|
committer | Thorkil Naur <naur@post11.tele.dk> | 2007-10-05 14:44:54 +0000 |
commit | 0c6396db699de40cf55493f52760d60876fc0826 (patch) | |
tree | fdfc1913416025fb4f75815ed11b1ae922c78eae /rts/sm/Evac.h | |
parent | e4df724b48c980b5507bb0d5e74d1f80beb9edeb (diff) | |
download | haskell-0c6396db699de40cf55493f52760d60876fc0826.tar.gz |
FIX validate for PPC Mac OS X - Evac.h
Diffstat (limited to 'rts/sm/Evac.h')
-rw-r--r-- | rts/sm/Evac.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/rts/sm/Evac.h b/rts/sm/Evac.h index c0aeeb546d..beaba755c1 100644 --- a/rts/sm/Evac.h +++ b/rts/sm/Evac.h @@ -12,7 +12,16 @@ * ---------------------------------------------------------------------------*/ // Use a register argument for evacuate, if available. -#if __GNUC__ >= 2 +// Earlier, the regparm attribute was used whenever __GNUC__ >= 2, but this +// generated warnings on PPC. So the use is restricted further. +// See http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html that says +// regparm (number) +// On the Intel 386, the regparm attribute causes the compiler to pass +// arguments number one to number if they are of integral type in +// registers EAX, EDX, and ECX instead of on the stack. Functions that +// take a variable number of arguments will continue to be passed all of +// their arguments on the stack. +#if __GNUC__ >= 2 && (defined(x86_64_TARGET_ARCH) || defined(i386_TARGET_ARCH)) #define REGPARM1 __attribute__((regparm(1))) #else #define REGPARM1 |