r201223 - [ARM] Fix NEON wrongly being enabled with soft-float when targeting armv8/Cortex-A53/A57.
Amara Emerson
amara.emerson at arm.com
Wed Feb 12 02:22:35 PST 2014
Author: aemerson
Date: Wed Feb 12 04:22:35 2014
New Revision: 201223
URL: http://llvm.org/viewvc/llvm-project?rev=201223&view=rev
Log:
[ARM] Fix NEON wrongly being enabled with soft-float when targeting armv8/Cortex-A53/A57.
This was caused by r200708 which enabled the crypto feature for these cores.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Driver/arm-mfpu.c
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=201223&r1=201222&r2=201223&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Feb 12 04:22:35 2014
@@ -718,8 +718,11 @@ static void getARMTargetFeatures(const D
// Setting -msoft-float effectively disables NEON because of the GCC
// implementation, although the same isn't true of VFP or VFP3.
- if (FloatABI == "soft")
+ if (FloatABI == "soft") {
Features.push_back("-neon");
+ // Also need to explicitly disable features which imply NEON.
+ Features.push_back("-crypto");
+ }
// En/disable crc
if (Arg *A = Args.getLastArg(options::OPT_mcrc,
Modified: cfe/trunk/test/Driver/arm-mfpu.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/arm-mfpu.c?rev=201223&r1=201222&r2=201223&view=diff
==============================================================================
--- cfe/trunk/test/Driver/arm-mfpu.c (original)
+++ cfe/trunk/test/Driver/arm-mfpu.c Wed Feb 12 04:22:35 2014
@@ -63,11 +63,16 @@
// RUN: | FileCheck --check-prefix=CHECK-SOFT-FLOAT %s
// CHECK-SOFT-FLOAT: "-target-feature" "-neon"
+// RUN: %clang -target armv8 %s -### 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-ARMV8-DEFAULT-SOFT-FP %s
+// CHECK-ARMV8-DEFAULT-SOFT-FP: "-target-feature" "-neon"
+// CHECK-ARMV8-DEFAULT-SOFT-FP: "-target-feature" "-crypto"
+
// RUN: %clang -target armv8 -mfpu=fp-armv8 %s -### 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-ARMV8-SOFT-FLOAT %s
// CHECK-ARMV8-SOFT-FLOAT: "-target-feature" "+fp-armv8"
-// CHECK-ARMV8-SOFT-FLOAT: "-target-feature" "-crypto"
// CHECK-ARMV8-SOFT-FLOAT: "-target-feature" "-neon"
+// CHECK-ARMV8-SOFT-FLOAT: "-target-feature" "-crypto"
// RUN: %clang -target armv8-linux-gnueabihf -mfpu=fp-armv8 %s -### 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-FP-ARMV8 %s
More information about the cfe-commits
mailing list