[SystemZ] Add support for new cpu architecture - arch13
This patch series adds support for the next-generation arch13
CPU architecture to the SystemZ backend.
This includes:
- Basic support for the new processor and its features.
- Support for low-level builtins mapped to new LLVM intrinsics.
- New high-level intrinsics in vecintrin.h.
- Indicate support by defining __VEC__ == 10303.
Note: No currently available Z system supports the arch13
architecture. Once new systems become available, the
official system name will be added as supported -march name.
llvm-svn: 365933
diff --git a/clang/lib/Basic/Targets/SystemZ.cpp b/clang/lib/Basic/Targets/SystemZ.cpp
index 8131798..d86928a 100644
--- a/clang/lib/Basic/Targets/SystemZ.cpp
+++ b/clang/lib/Basic/Targets/SystemZ.cpp
@@ -91,7 +91,8 @@
{{"arch9"}, 9}, {{"z196"}, 9},
{{"arch10"}, 10}, {{"zEC12"}, 10},
{{"arch11"}, 11}, {{"z13"}, 11},
- {{"arch12"}, 12}, {{"z14"}, 12}
+ {{"arch12"}, 12}, {{"z14"}, 12},
+ {{"arch13"}, 13},
};
int SystemZTargetInfo::getISARevision(StringRef Name) const {
@@ -118,6 +119,7 @@
.Case("arch10", ISARevision >= 10)
.Case("arch11", ISARevision >= 11)
.Case("arch12", ISARevision >= 12)
+ .Case("arch13", ISARevision >= 13)
.Case("htm", HasTransactionalExecution)
.Case("vx", HasVector)
.Default(false);
@@ -142,7 +144,7 @@
if (HasVector)
Builder.defineMacro("__VX__");
if (Opts.ZVector)
- Builder.defineMacro("__VEC__", "10302");
+ Builder.defineMacro("__VEC__", "10303");
}
ArrayRef<Builtin::Info> SystemZTargetInfo::getTargetBuiltins() const {
diff --git a/clang/lib/Basic/Targets/SystemZ.h b/clang/lib/Basic/Targets/SystemZ.h
index d25c630..e751806 100644
--- a/clang/lib/Basic/Targets/SystemZ.h
+++ b/clang/lib/Basic/Targets/SystemZ.h
@@ -100,6 +100,8 @@
Features["vector"] = true;
if (ISARevision >= 12)
Features["vector-enhancements-1"] = true;
+ if (ISARevision >= 13)
+ Features["vector-enhancements-2"] = true;
return TargetInfo::initFeatureMap(Features, Diags, CPU, FeaturesVec);
}