summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/arm-target-features.c
diff options
context:
space:
mode:
authorRenato Golin <renato.golin@linaro.org>2014-10-13 10:22:48 +0000
committerRenato Golin <renato.golin@linaro.org>2014-10-13 10:22:48 +0000
commit5886bc35b0ee3b2eb953741e974073ff815cb999 (patch)
tree344bcc95f6697238b13d62369861a58b699ee762 /clang/test/Preprocessor/arm-target-features.c
parent16ea8ba3bcd99d86b5bff5d410deac2e3517eb4a (diff)
downloadbcm5719-llvm-5886bc35b0ee3b2eb953741e974073ff815cb999.tar.gz
bcm5719-llvm-5886bc35b0ee3b2eb953741e974073ff815cb999.zip
Adds support for the Cortex-A17 processor to Clang
Patch by Matthew Wahab. llvm-svn: 219607
Diffstat (limited to 'clang/test/Preprocessor/arm-target-features.c')
-rw-r--r--clang/test/Preprocessor/arm-target-features.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/arm-target-features.c b/clang/test/Preprocessor/arm-target-features.c
index b56eb7ccc9e..8155e025874 100644
--- a/clang/test/Preprocessor/arm-target-features.c
+++ b/clang/test/Preprocessor/arm-target-features.c
@@ -207,6 +207,25 @@
// RUN: %clang -target armv7 -mthumb -mcpu=cortex-a15 -x c -E -dM %s -o - | FileCheck --check-prefix=A15-THUMB %s
// A15-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1
+// Check that -mfpu works properly for Cortex-A17 (enabled by default).
+// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a17 -x c -E -dM %s -o - | FileCheck --check-prefix=DEFAULTFPU-A17 %s
+// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a17 -x c -E -dM %s -o - | FileCheck --check-prefix=DEFAULTFPU-A17 %s
+// DEFAULTFPU-A17:#define __ARM_NEON__ 1
+// DEFAULTFPU-A17:#define __ARM_VFPV4__ 1
+
+// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a17 -mfpu=none -x c -E -dM %s -o - | FileCheck --check-prefix=FPUNONE-A17 %s
+// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a17 -mfpu=none -x c -E -dM %s -o - | FileCheck --check-prefix=FPUNONE-A17 %s
+// FPUNONE-A17-NOT:#define __ARM_NEON__ 1
+// FPUNONE-A17-NOT:#define __ARM_VFPV4__ 1
+
+// Test whether predefines are as expected when targeting cortex-a17.
+// RUN: %clang -target armv7 -mcpu=cortex-a17 -x c -E -dM %s -o - | FileCheck --check-prefix=A17 %s
+// RUN: %clang -target armv7 -mthumb -mcpu=cortex-a17 -x c -E -dM %s -o - | FileCheck --check-prefix=A17 %s
+// A17:#define __ARM_ARCH 7
+// A17:#define __ARM_ARCH_7A__ 1
+// A17:#define __ARM_ARCH_EXT_IDIV__ 1
+// A17:#define __ARM_ARCH_PROFILE 'A'
+
// Test whether predefines are as expected when targeting swift.
// RUN: %clang -target armv7s -mcpu=swift -x c -E -dM %s -o - | FileCheck --check-prefix=SWIFT-ARM %s
// SWIFT-ARM:#define __ARM_ARCH_EXT_IDIV__ 1
OpenPOWER on IntegriCloud