summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/unistd.h
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-04-23 14:51:14 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2012-04-23 14:51:14 -0700
commit98e5272fe70d62e193f70acf9951667beab27aba (patch)
tree1eaaffa263b36e2ab0cc4dab8a46c9e6b48adb8b /arch/x86/include/asm/unistd.h
parentcd74257b974d6d26442c97891c4d05772748b177 (diff)
downloadblackbird-obmc-linux-98e5272fe70d62e193f70acf9951667beab27aba.tar.gz
blackbird-obmc-linux-98e5272fe70d62e193f70acf9951667beab27aba.zip
x32: Check __ILP32__ instead of __LP64__ for x32
Check __LP64__ isn't a reliable way to tell if we are compiling for x32 since __LP64__ isnn't specified by x86-64 psABI. Not all x86-64 compilers define __LP64__, which was added to GCC 3.3. The updated x32 psABI: https://sites.google.com/site/x32abi/documents definse _ILP32 and __ILP32__ for x32. GCC trunk and 4.7 branch have been updated to define _ILP32 and __ILP32__ for x32. This patch replaces __LP64__ check with __ILP32__. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/include/asm/unistd.h')
-rw-r--r--arch/x86/include/asm/unistd.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/include/asm/unistd.h b/arch/x86/include/asm/unistd.h
index 37cdc9d99bb1..4437001d8e3d 100644
--- a/arch/x86/include/asm/unistd.h
+++ b/arch/x86/include/asm/unistd.h
@@ -63,10 +63,10 @@
#else
# ifdef __i386__
# include <asm/unistd_32.h>
-# elif defined(__LP64__)
-# include <asm/unistd_64.h>
-# else
+# elif defined(__ILP32__)
# include <asm/unistd_x32.h>
+# else
+# include <asm/unistd_64.h>
# endif
#endif
OpenPOWER on IntegriCloud