diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-01-24 22:00:03 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-01-24 22:00:03 +0000 |
commit | 480093f4440d54b30b3025afeac24b48f2ba7a2e (patch) | |
tree | 162e72994062888647caf0d875428db9445491a8 /contrib/llvm-project/clang/lib/Basic/Targets/PPC.cpp | |
parent | 489b1cf2ecf5b9b4a394857987014bfb09067726 (diff) | |
parent | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff) | |
download | src-480093f4440d54b30b3025afeac24b48f2ba7a2e.tar.gz src-480093f4440d54b30b3025afeac24b48f2ba7a2e.zip |
Merge ^/vendor/lvm-project/master up to its last change (upstream commit
e26a78e70), and resolve conflicts.
Notes
Notes:
svn path=/projects/clang1000-import/; revision=357095
Diffstat (limited to 'contrib/llvm-project/clang/lib/Basic/Targets/PPC.cpp')
-rw-r--r-- | contrib/llvm-project/clang/lib/Basic/Targets/PPC.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/PPC.cpp b/contrib/llvm-project/clang/lib/Basic/Targets/PPC.cpp index baa96e21707b..1877d4a5ef70 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/PPC.cpp +++ b/contrib/llvm-project/clang/lib/Basic/Targets/PPC.cpp @@ -159,6 +159,8 @@ void PPCTargetInfo::getTargetDefines(const LangOptions &Opts, } if (ArchDefs & ArchDefineE500) Builder.defineMacro("__NO_LWSYNC__"); + if (ArchDefs & ArchDefineFuture) + Builder.defineMacro("_ARCH_PWR_FUTURE"); if (getTriple().getVendor() == llvm::Triple::BGQ) { Builder.defineMacro("__bg__"); @@ -319,6 +321,13 @@ bool PPCTargetInfo::initFeatureMap( .Case("e500", true) .Default(false); + // Future CPU should include all of the features of Power 9 as well as any + // additional features (yet to be determined) specific to it. + if (CPU == "future") { + initFeatureMap(Features, Diags, "pwr9", FeaturesVec); + addFutureSpecificFeatures(Features); + } + if (!ppcUserFeaturesCheck(Diags, FeaturesVec)) return false; @@ -332,6 +341,12 @@ bool PPCTargetInfo::initFeatureMap( return TargetInfo::initFeatureMap(Features, Diags, CPU, FeaturesVec); } +// Add features specific to the "Future" CPU. +void PPCTargetInfo::addFutureSpecificFeatures( + llvm::StringMap<bool> &Features) const { + return; +} + bool PPCTargetInfo::hasFeature(StringRef Feature) const { return llvm::StringSwitch<bool>(Feature) .Case("powerpc", true) @@ -466,6 +481,7 @@ static constexpr llvm::StringLiteral ValidCPUNames[] = { {"pwr6"}, {"power6x"}, {"pwr6x"}, {"power7"}, {"pwr7"}, {"power8"}, {"pwr8"}, {"power9"}, {"pwr9"}, {"powerpc"}, {"ppc"}, {"powerpc64"}, {"ppc64"}, {"powerpc64le"}, {"ppc64le"}, + {"future"} }; bool PPCTargetInfo::isValidCPUName(StringRef Name) const { |