summaryrefslogtreecommitdiffstats
path: root/compiler-rt
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2012-11-20 08:57:26 +0000
committerKostya Serebryany <kcc@google.com>2012-11-20 08:57:26 +0000
commit87e0464bfb0076179c152c80cdb31d80bf138f90 (patch)
treef0386b9eb4523b27f25432aeaf7a1423f2c48131 /compiler-rt
parent8461e384f49c44290cb79d17820d213cd261e3d9 (diff)
downloadbcm5719-llvm-87e0464bfb0076179c152c80cdb31d80bf138f90.tar.gz
bcm5719-llvm-87e0464bfb0076179c152c80cdb31d80bf138f90.zip
[asan] better support for powerpc and sparc targets (thanks to H.J. Liu and David Miller)
llvm-svn: 168358
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_linux.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc
index 3f79163fca5..541f22be842 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc
@@ -32,10 +32,9 @@
#include <errno.h>
// Are we using 32-bit or 64-bit syscalls?
-// We need to list the 64-bit architecures explicitly because for x32
-// (which defines __x86_64__) we have __WORDSIZE == 32,
-// but we still need to use 64-bit syscalls.
-#if defined(__x86_64__) || defined(__powerpc64__) || defined(__sparc64__)
+// x32 (which defines __x86_64__) has __WORDSIZE == 32
+// but it still needs to use 64-bit syscalls.
+#if defined(__x86_64__) || __WORDSIZE == 64
# define SANITIZER_LINUX_USES_64BIT_SYSCALLS 1
#else
# define SANITIZER_LINUX_USES_64BIT_SYSCALLS 0
OpenPOWER on IntegriCloud