r190702 - Fix Neon detection for Cortex-A class, plus adds some more CPUs to default features
Renato Golin
renato.golin at linaro.org
Fri Sep 13 10:02:46 PDT 2013
Author: rengolin
Date: Fri Sep 13 12:02:45 2013
New Revision: 190702
URL: http://llvm.org/viewvc/llvm-project?rev=190702&view=rev
Log:
Fix Neon detection for Cortex-A class, plus adds some more CPUs to default features
Modified:
cfe/trunk/lib/Basic/Targets.cpp
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=190702&r1=190701&r2=190702&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Fri Sep 13 12:02:45 2013
@@ -3648,10 +3648,12 @@ public:
void getDefaultFeatures(llvm::StringMap<bool> &Features) const {
if (CPU == "arm1136jf-s" || CPU == "arm1176jzf-s" || CPU == "mpcore")
Features["vfp2"] = true;
- else if (CPU == "cortex-a8" || CPU == "cortex-a15" ||
- CPU == "cortex-a9" || CPU == "cortex-a9-mp")
+ else if (CPU == "cortex-a8" || CPU == "cortex-a9" ||
+ CPU == "cortex-a9-mp") {
+ Features["vfp3"] = true;
Features["neon"] = true;
- else if (CPU == "swift" || CPU == "cortex-a7") {
+ } else if (CPU == "swift" || CPU == "cortex-a5" ||
+ CPU == "cortex-a7" || CPU == "cortex-a15") {
Features["vfp4"] = true;
Features["neon"] = true;
}
@@ -3702,8 +3704,9 @@ public:
.Case("arm", true)
.Case("softfloat", SoftFloat)
.Case("thumb", IsThumb)
- .Case("neon", FPU == NeonFPU && !SoftFloat &&
- StringRef(getCPUDefineSuffix(CPU)).startswith("7"))
+ .Case("neon", (FPU & NeonFPU) && !SoftFloat &&
+ (StringRef(getCPUDefineSuffix(CPU)).startswith("7") ||
+ StringRef(getCPUDefineSuffix(CPU)).startswith("8")))
.Default(false);
}
// FIXME: Should we actually have some table instead of these switches?
More information about the cfe-commits
mailing list