14 #ifndef LLVM_CLANG_LIB_BASIC_TARGETS_SYSTEMZ_H 15 #define LLVM_CLANG_LIB_BASIC_TARGETS_SYSTEMZ_H 19 #include "llvm/ADT/Triple.h" 20 #include "llvm/Support/Compiler.h" 31 bool HasTransactionalExecution;
36 :
TargetInfo(Triple), CPU(
"z10"), ISARevision(8),
37 HasTransactionalExecution(
false), HasVector(
false) {
38 IntMaxType = SignedLong;
39 Int64Type = SignedLong;
41 IntWidth = IntAlign = 32;
42 LongWidth = LongLongWidth = LongAlign = LongLongAlign = 64;
43 PointerWidth = PointerAlign = 64;
44 LongDoubleWidth = 128;
46 LongDoubleFormat = &llvm::APFloat::IEEEquad();
47 DefaultAlignForAttributeAligned = 64;
49 resetDataLayout(
"E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-a:8:16-n32:64");
50 MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64;
65 bool validateAsmConstraint(
const char *&Name,
77 int getISARevision(
const StringRef &Name)
const;
80 return getISARevision(Name) != -1;
83 bool setCPU(
const std::string &Name)
override {
85 ISARevision = getISARevision(CPU);
86 return ISARevision != -1;
92 const std::vector<std::string> &FeaturesVec)
const override {
93 int ISARevision = getISARevision(CPU);
94 if (ISARevision >= 10)
95 Features[
"transactional-execution"] =
true;
96 if (ISARevision >= 11)
97 Features[
"vector"] =
true;
98 if (ISARevision >= 12)
99 Features[
"vector-enhancements-1"] =
true;
105 HasTransactionalExecution =
false;
107 for (
const auto &Feature : Features) {
108 if (Feature ==
"+transactional-execution")
109 HasTransactionalExecution =
true;
110 else if (Feature ==
"+vector")
116 resetDataLayout(
"E-m:e-i1:8:16-i8:8:16-i64:64-f128:64" 117 "-v128:64-a:8:16-n32:64");
122 bool hasFeature(StringRef Feature)
const override;
145 #endif // LLVM_CLANG_LIB_BASIC_TARGETS_SYSTEMZ_H
static const Builtin::Info BuiltinInfo[]
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...
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.
bool useFloat128ManglingForLongDouble() const override
Return true if the 'long double' type should be mangled like __float128.
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.
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.
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 ...