summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/predefined-arch-macros.c
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@bec.de>2015-11-09 23:39:45 +0000
committerJoerg Sonnenberger <joerg@bec.de>2015-11-09 23:39:45 +0000
commitec353d3fc60dae74797b7f8f8f995c9d47bae329 (patch)
treea9584282819162b5d0083d310892596615e69602 /clang/test/Preprocessor/predefined-arch-macros.c
parent7068fc369d9c9d77499909d6689686fc6f0e987c (diff)
downloadbcm5719-llvm-ec353d3fc60dae74797b7f8f8f995c9d47bae329.tar.gz
bcm5719-llvm-ec353d3fc60dae74797b7f8f8f995c9d47bae329.zip
Reorganise CPU handling for Sparc. When using -mcpu=v9 and co, __sparcv8
is not defined for 32bit mode, but __sparcv9 is. Pass down the correct -target-cpu flags to the backend, so that instruction restrictions are applied correctly. Pass down the correct -A flag when not using IAS. The latter is limited to NetBSD targets in this commit. llvm-svn: 252545
Diffstat (limited to 'clang/test/Preprocessor/predefined-arch-macros.c')
-rw-r--r--clang/test/Preprocessor/predefined-arch-macros.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/predefined-arch-macros.c b/clang/test/Preprocessor/predefined-arch-macros.c
index 41308103994..1254ac4627e 100644
--- a/clang/test/Preprocessor/predefined-arch-macros.c
+++ b/clang/test/Preprocessor/predefined-arch-macros.c
@@ -1741,11 +1741,20 @@
// RUN: %clang -E -dM %s -o - 2>&1 \
// RUN: -target sparc-unknown-linux \
// RUN: | FileCheck %s -check-prefix=CHECK_SPARC
+// RUN: %clang -mcpu=v9 -E -dM %s -o - 2>&1 \
+// RUN: -target sparc-unknown-linux \
+// RUN: | FileCheck %s -check-prefix=CHECK_SPARC-V9
//
// CHECK_SPARC: #define __BIG_ENDIAN__ 1
// CHECK_SPARC: #define __sparc 1
// CHECK_SPARC: #define __sparc__ 1
+// CHECK_SPARC-NOT: #define __sparcv9 1
// CHECK_SPARC: #define __sparcv8 1
+// CHECK_SPARC-NOT: #define __sparcv9 1
+
+// CHECK_SPARC-V9-NOT: #define __sparcv8 1
+// CHECK_SPARC-V9: #define __sparcv9 1
+// CHECK_SPARC-V9-NOT: #define __sparcv8 1
//
// RUN: %clang -E -dM %s -o - 2>&1 \
OpenPOWER on IntegriCloud