aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-01-20 20:27:51 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-01-20 20:27:51 +0000
commitb14637d118e110006a149a79b649c5695e7f419a (patch)
tree08af367508a1250d4cfff69fae52870a84a44456 /contrib/llvm-project/llvm
parent2dd94b045e8c069c1a748d40d30d979e30e02fc9 (diff)
parentf8e1cfad89431e1a6429dcc4b9d33db000957ee3 (diff)
Notes
Diffstat (limited to 'contrib/llvm-project/llvm')
-rw-r--r--contrib/llvm-project/llvm/include/llvm/ADT/Triple.h4
-rw-r--r--contrib/llvm-project/llvm/lib/Support/Triple.cpp5
-rw-r--r--contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.td2
-rw-r--r--contrib/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp2
4 files changed, 10 insertions, 3 deletions
diff --git a/contrib/llvm-project/llvm/include/llvm/ADT/Triple.h b/contrib/llvm-project/llvm/include/llvm/ADT/Triple.h
index edeb31efab80..1ef3645a291d 100644
--- a/contrib/llvm-project/llvm/include/llvm/ADT/Triple.h
+++ b/contrib/llvm-project/llvm/include/llvm/ADT/Triple.h
@@ -128,7 +128,9 @@ public:
KalimbaSubArch_v4,
KalimbaSubArch_v5,
- MipsSubArch_r6
+ MipsSubArch_r6,
+
+ PPCSubArch_spe
};
enum VendorType {
UnknownVendor,
diff --git a/contrib/llvm-project/llvm/lib/Support/Triple.cpp b/contrib/llvm-project/llvm/lib/Support/Triple.cpp
index d419463e6a5e..18b013e1df3f 100644
--- a/contrib/llvm-project/llvm/lib/Support/Triple.cpp
+++ b/contrib/llvm-project/llvm/lib/Support/Triple.cpp
@@ -389,7 +389,7 @@ static Triple::ArchType parseArch(StringRef ArchName) {
// FIXME: Do we need to support these?
.Cases("i786", "i886", "i986", Triple::x86)
.Cases("amd64", "x86_64", "x86_64h", Triple::x86_64)
- .Cases("powerpc", "ppc", "ppc32", Triple::ppc)
+ .Cases("powerpc", "powerpcspe", "ppc", "ppc32", Triple::ppc)
.Cases("powerpc64", "ppu", "ppc64", Triple::ppc64)
.Cases("powerpc64le", "ppc64le", Triple::ppc64le)
.Case("xscale", Triple::arm)
@@ -563,6 +563,9 @@ static Triple::SubArchType parseSubArch(StringRef SubArchName) {
(SubArchName.endswith("r6el") || SubArchName.endswith("r6")))
return Triple::MipsSubArch_r6;
+ if (SubArchName == "powerpcspe")
+ return Triple::PPCSubArch_spe;
+
StringRef ARMSubArch = ARM::getCanonicalArchName(SubArchName);
// For now, this is the small part. Early return.
diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.td b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.td
index 8e94a2ae15e0..1724969a1ccc 100644
--- a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.td
+++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.td
@@ -378,7 +378,7 @@ def : ProcessorModel<"g5", G5Model,
def : ProcessorModel<"e500", PPCE500Model,
[DirectiveE500,
FeatureICBT, FeatureBookE,
- FeatureISEL, FeatureMFTB]>;
+ FeatureISEL, FeatureMFTB, FeatureSPE]>;
def : ProcessorModel<"e500mc", PPCE500mcModel,
[DirectiveE500mc,
FeatureSTFIWX, FeatureICBT, FeatureBookE,
diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
index 6239decf1539..4ee6b88ad905 100644
--- a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
@@ -126,6 +126,8 @@ void PPCSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) {
// If cross-compiling with -march=ppc64le without -mcpu
if (TargetTriple.getArch() == Triple::ppc64le)
CPUName = "ppc64le";
+ else if (TargetTriple.getSubArch() == Triple::PPCSubArch_spe)
+ CPUName = "e500";
else
CPUName = "generic";
}