summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChains/Arch/ARM.cpp
diff options
context:
space:
mode:
authorKeith Walker <kwalker@arm.com>2017-11-30 12:05:18 +0000
committerKeith Walker <kwalker@arm.com>2017-11-30 12:05:18 +0000
commitc5bbd114068cbf6236f3a08016fd0d016e39b68b (patch)
tree66348f401856d0af6ec683a2095ff5862eac5c5c /clang/lib/Driver/ToolChains/Arch/ARM.cpp
parentd1a7d0c3f1e455720b2a0f819371c12f816a3b10 (diff)
downloadbcm5719-llvm-c5bbd114068cbf6236f3a08016fd0d016e39b68b.tar.gz
bcm5719-llvm-c5bbd114068cbf6236f3a08016fd0d016e39b68b.zip
Revert [ARM] disable FPU features when using soft floating point.
This reverts r319420 It is failing the test Driver/arm-mfpu.c so reverting while I investigate the failure. llvm-svn: 319425
Diffstat (limited to 'clang/lib/Driver/ToolChains/Arch/ARM.cpp')
-rw-r--r--clang/lib/Driver/ToolChains/Arch/ARM.cpp20
1 files changed, 5 insertions, 15 deletions
diff --git a/clang/lib/Driver/ToolChains/Arch/ARM.cpp b/clang/lib/Driver/ToolChains/Arch/ARM.cpp
index 5be8698affc..44c8871d0e1 100644
--- a/clang/lib/Driver/ToolChains/Arch/ARM.cpp
+++ b/clang/lib/Driver/ToolChains/Arch/ARM.cpp
@@ -391,22 +391,12 @@ void arm::getARMTargetFeatures(const ToolChain &TC,
} else if (HDivArg)
getARMHWDivFeatures(D, HDivArg, Args, HDivArg->getValue(), Features);
- // Setting -msoft-float/-mfloat-abi=soft effectively disables the FPU (GCC
- // ignores the -mfpu options in this case).
- // Note that the ABI can also be set implicitly by the target selected.
+ // Setting -msoft-float effectively disables NEON because of the GCC
+ // implementation, although the same isn't true of VFP or VFP3.
if (ABI == arm::FloatABI::Soft) {
- llvm::ARM::getFPUFeatures(llvm::ARM::FK_NONE, Features);
-
- // Disable hardware FP features which have been enabled.
- // FIXME: Disabling vfp2 and neon should be enough as all the other
- // features are dependant on these 2 features in LLVM. However
- // there is currently no easy way to test this in clang, so for
- // now just be explicit and disable all known dependent features
- // as well.
- for (std::string Feature : {"vfp2", "vfp3", "vfp4", "fp-armv8", "fullfp16",
- "neon", "crypto", "dotprod"})
- if (std::find(std::begin(Features), std::end(Features), "+" + Feature) != std::end(Features))
- Features.push_back("-" + Feature);
+ Features.push_back("-neon");
+ // Also need to explicitly disable features which imply NEON.
+ Features.push_back("-crypto");
}
// En/disable crc code generation.
OpenPOWER on IntegriCloud