summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2013-02-01 18:44:19 +0000
committerHal Finkel <hfinkel@anl.gov>2013-02-01 18:44:19 +0000
commitb58ce85ecc1e676ec4c38157f2fae293766a0aad (patch)
treeaa79c17e4613932dba1bdfa1dd27661eac81ef47 /clang/lib/Basic
parentdbf46a16c70cdaf722ee540fafd47f2b77e6807e (diff)
downloadbcm5719-llvm-b58ce85ecc1e676ec4c38157f2fae293766a0aad.tar.gz
bcm5719-llvm-b58ce85ecc1e676ec4c38157f2fae293766a0aad.zip
Add -mqpx and -mno-qpx feature flags to toggle use of the PPC QPX vector instruction set
I've renamed the altivec test to ppc-features (because now there is more than one feature to test). llvm-svn: 174204
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r--clang/lib/Basic/Targets.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp
index 46479702952..c2252062084 100644
--- a/clang/lib/Basic/Targets.cpp
+++ b/clang/lib/Basic/Targets.cpp
@@ -946,12 +946,14 @@ void PPCTargetInfo::getDefaultFeatures(llvm::StringMap<bool> &Features) const {
.Case("pwr7", true)
.Case("ppc64", true)
.Default(false);
+
+ Features["qpx"] = (CPU == "a2q");
}
bool PPCTargetInfo::setFeatureEnabled(llvm::StringMap<bool> &Features,
StringRef Name,
bool Enabled) const {
- if (Name == "altivec") {
+ if (Name == "altivec" || Name == "qpx") {
Features[Name] = Enabled;
return true;
}
OpenPOWER on IntegriCloud