13 #ifndef LLVM_CLANG_LIB_BASIC_TARGETS_SYSTEMZ_H 14 #define LLVM_CLANG_LIB_BASIC_TARGETS_SYSTEMZ_H 18 #include "llvm/ADT/Triple.h" 19 #include "llvm/Support/Compiler.h" 30 bool HasTransactionalExecution;
35 :
TargetInfo(Triple), CPU(
"z10"), ISARevision(8),
36 HasTransactionalExecution(
false), HasVector(
false) {
37 IntMaxType = SignedLong;
38 Int64Type = SignedLong;
40 IntWidth = IntAlign = 32;
41 LongWidth = LongLongWidth = LongAlign = LongLongAlign = 64;
42 PointerWidth = PointerAlign = 64;
43 LongDoubleWidth = 128;
45 LongDoubleFormat = &llvm::APFloat::IEEEquad();
46 DefaultAlignForAttributeAligned = 64;
48 resetDataLayout(
"E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-a:8:16-n32:64");
49 MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64;
66 bool validateAsmConstraint(
const char *&Name,
78 int getISARevision(StringRef Name)
const;
81 return getISARevision(Name) != -1;
86 bool setCPU(
const std::string &Name)
override {
88 ISARevision = getISARevision(CPU);
89 return ISARevision != -1;
95 const std::vector<std::string> &FeaturesVec)
const override {
96 int ISARevision = getISARevision(CPU);
97 if (ISARevision >= 10)
98 Features[
"transactional-execution"] =
true;
99 if (ISARevision >= 11)
100 Features[
"vector"] =
true;
101 if (ISARevision >= 12)
102 Features[
"vector-enhancements-1"] =
true;
103 if (ISARevision >= 13)
104 Features[
"vector-enhancements-2"] =
true;
110 HasTransactionalExecution =
false;
112 for (
const auto &Feature : Features) {
113 if (Feature ==
"+transactional-execution")
114 HasTransactionalExecution =
true;
115 else if (Feature ==
"+vector")
121 resetDataLayout(
"E-m:e-i1:8:16-i8:8:16-i64:64-f128:64" 122 "-v128:64-a:8:16-n32:64");
127 bool hasFeature(StringRef Feature)
const override;
150 #endif // LLVM_CLANG_LIB_BASIC_TARGETS_SYSTEMZ_H
static const Builtin::Info BuiltinInfo[]
bool setCPU(const std::string &Name) override
Target the specified CPU.
Options for controlling the target.
StringRef getABI() const override
Get the ABI currently in use.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Concrete class used by the front-end to report problems and issues.
static const char *const GCCRegNames[]
CallingConvCheckResult checkCallingConvention(CallingConv CC) const override
Determines whether a given calling convention is valid for the target.
Exposes information about the current target.
virtual bool initFeatureMap(llvm::StringMap< bool > &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector< std::string > &FeatureVec) const
Initialize the map with the default set of target features for the CPU this should include all legal ...
const char * getClobbers() const override
Returns a string of target-specific clobbers, in LLVM format.
ArrayRef< TargetInfo::GCCRegAlias > getGCCRegAliases() const override
CallingConv
CallingConv - Specifies the calling convention that a function uses.
const char * getLongDoubleMangling() const override
Return the mangled code of long double.
Defines the clang::TargetOptions class.
BuiltinVaListKind getBuiltinVaListKind() const override
Returns the kind of __builtin_va_list type that should be used with this target.
Dataflow Directional Tag Classes.
bool isValidCPUName(StringRef Name) const override
brief Determine whether this TargetInfo supports the given CPU name.
BuiltinVaListKind
The different kinds of __builtin_va_list types defined by the target implementation.
static bool hasFeature(StringRef Feature, const LangOptions &LangOpts, const TargetInfo &Target)
Determine whether a translation unit built using the current language options has the given feature...
Defines the clang::TargetInfo interface.
SystemZTargetInfo(const llvm::Triple &Triple, const TargetOptions &)
bool handleTargetFeatures(std::vector< std::string > &Features, DiagnosticsEngine &Diags) override
Perform initialization based on the user configured set of features (e.g., +sse4).
bool initFeatureMap(llvm::StringMap< bool > &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector< std::string > &FeaturesVec) const override
Initialize the map with the default set of target features for the CPU this should include all legal ...