diff options
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
-rw-r--r-- | clang/lib/Basic/Targets.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index 0df01df77fb..902f1c3c610 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -672,13 +672,14 @@ class PPCTargetInfo : public TargetInfo { // Target cpu features. bool HasVSX; + bool HasPower8Vector; protected: std::string ABI; public: PPCTargetInfo(const llvm::Triple &Triple) - : TargetInfo(Triple), HasVSX(false) { + : TargetInfo(Triple), HasVSX(false), HasPower8Vector(false) { BigEndian = (Triple.getArch() != llvm::Triple::ppc64le); LongDoubleWidth = LongDoubleAlign = 128; LongDoubleFormat = &llvm::APFloat::PPCDoubleDouble; @@ -934,6 +935,11 @@ bool PPCTargetInfo::handleTargetFeatures(std::vector<std::string> &Features, continue; } + if (Feature == "power8-vector") { + HasPower8Vector = true; + continue; + } + // TODO: Finish this list and add an assert that we've handled them // all. } @@ -1084,6 +1090,8 @@ void PPCTargetInfo::getTargetDefines(const LangOptions &Opts, if (HasVSX) Builder.defineMacro("__VSX__"); + if (HasPower8Vector) + Builder.defineMacro("__POWER8_VECTOR__"); // FIXME: The following are not yet generated here by Clang, but are // generated by GCC: |