diff options
| author | Renato Golin <renato.golin@linaro.org> | 2013-09-13 17:02:45 +0000 |
|---|---|---|
| committer | Renato Golin <renato.golin@linaro.org> | 2013-09-13 17:02:45 +0000 |
| commit | eefb577be8a8ebd8a964d6e18b9f73d3ae866840 (patch) | |
| tree | e9f99bf4158d1c6370f283c3a201da2ccac671d3 /clang/lib/Basic | |
| parent | ca9fe1453f00e3e7d914ce3d4cf85005145b79d0 (diff) | |
| download | bcm5719-llvm-eefb577be8a8ebd8a964d6e18b9f73d3ae866840.tar.gz bcm5719-llvm-eefb577be8a8ebd8a964d6e18b9f73d3ae866840.zip | |
Fix Neon detection for Cortex-A class, plus adds some more CPUs to default features
llvm-svn: 190702
Diffstat (limited to 'clang/lib/Basic')
| -rw-r--r-- | clang/lib/Basic/Targets.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index b1cbc23f814..b0467b53429 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -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? |

