r242841 - ARM: actually define __ARM_ARCH_7S__ for the armv7s slice
Tim Northover
tnorthover at apple.com
Tue Jul 21 14:47:33 PDT 2015
Author: tnorthover
Date: Tue Jul 21 16:47:33 2015
New Revision: 242841
URL: http://llvm.org/viewvc/llvm-project?rev=242841&view=rev
Log:
ARM: actually define __ARM_ARCH_7S__ for the armv7s slice
We ended up with the wrong predefine after the recent TargetParser shuffle, and
I accidentally solidified it with a test. This should fix it.
Modified:
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/test/Preprocessor/arm-target-features.c
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=242841&r1=242840&r2=242841&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Tue Jul 21 16:47:33 2015
@@ -4293,9 +4293,10 @@ class ARMTargetInfo : public TargetInfo
case llvm::ARM::AK_ARMV6SM:
case llvm::ARM::AK_ARMV6HL:
return "6M";
+ case llvm::ARM::AK_ARMV7S:
+ return "7S";
case llvm::ARM::AK_ARMV7:
case llvm::ARM::AK_ARMV7A:
- case llvm::ARM::AK_ARMV7S:
case llvm::ARM::AK_ARMV7L:
case llvm::ARM::AK_ARMV7HL:
return "7A";
Modified: cfe/trunk/test/Preprocessor/arm-target-features.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/arm-target-features.c?rev=242841&r1=242840&r2=242841&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/arm-target-features.c (original)
+++ cfe/trunk/test/Preprocessor/arm-target-features.c Tue Jul 21 16:47:33 2015
@@ -7,7 +7,6 @@
// CHECK: __ARM_FEATURE_NUMERIC_MAXMIN 1
// RUN: %clang -target armv7a-none-linux-gnu -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-V7 %s
-// RUN: %clang -target x86_64-apple-macosx10.10 -arch armv7s -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-V7 %s
// CHECK-V7: __ARMEL__ 1
// CHECK-V7: __ARM_ARCH 7
// CHECK-V7: __ARM_ARCH_7A__ 1
@@ -15,6 +14,14 @@
// CHECK-V7-NOT: __ARM_FEATURE_NUMERIC_MAXMIN
// CHECK-V7-NOT: __ARM_FEATURE_DIRECTED_ROUNDING
+// RUN: %clang -target x86_64-apple-macosx10.10 -arch armv7s -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-V7S %s
+// CHECK-V7S: __ARMEL__ 1
+// CHECK-V7S: __ARM_ARCH 7
+// CHECK-V7S: __ARM_ARCH_7S__ 1
+// CHECK-V7S-NOT: __ARM_FEATURE_CRC32
+// CHECK-V7S-NOT: __ARM_FEATURE_NUMERIC_MAXMIN
+// CHECK-V7S-NOT: __ARM_FEATURE_DIRECTED_ROUNDING
+
// RUN: %clang -target armv8a -mfloat-abi=hard -x c -E -dM %s | FileCheck --check-prefix=CHECK-V8-BAREHF %s
// CHECK-V8-BAREHF: __ARMEL__ 1
// CHECK-V8-BAREHF: __ARM_ARCH 8
More information about the cfe-commits
mailing list