13#ifndef LLVM_CLANG_LIB_BASIC_TARGETS_SYSTEMZ_H
14#define LLVM_CLANG_LIB_BASIC_TARGETS_SYSTEMZ_H
18#include "llvm/Support/Compiler.h"
19#include "llvm/TargetParser/Triple.h"
30 static const char *
const GCCRegNames[];
32 bool HasTransactionalExecution;
35 bool UnalignedSymbols;
36 enum AddrSpace { ptr32 = 1 };
42 UnalignedSymbols(
false) {
55 if (Triple.isOSzOS()) {
56 if (Triple.isArch64Bit()) {
84 unsigned getMinGlobalAlign(uint64_t Size,
bool HasNonWeakDef)
const override;
101 return RegName ==
"r15";
104 bool validateAsmConstraint(
const char *&Name,
108 switch (Constraint[0]) {
110 if (llvm::StringRef(Constraint) ==
"@cc") {
112 return std::string(
"{@cc}");
116 return std::string(
"p");
118 switch (Constraint[1]) {
126 return std::string(
"^") + std::string(Constraint++, 2);
148 int getISARevision(StringRef Name)
const;
166 return ISARevision != -1;
172 const std::vector<std::string> &FeaturesVec)
const override {
174 if (ISARevision >= 10)
175 Features[
"transactional-execution"] =
true;
176 if (ISARevision >= 11)
177 Features[
"vector"] =
true;
178 if (ISARevision >= 12)
179 Features[
"vector-enhancements-1"] =
true;
180 if (ISARevision >= 13)
181 Features[
"vector-enhancements-2"] =
true;
182 if (ISARevision >= 14)
183 Features[
"nnp-assist"] =
true;
184 if (ISARevision >= 15) {
185 Features[
"miscellaneous-extensions-4"] =
true;
186 Features[
"vector-enhancements-3"] =
true;
193 HasTransactionalExecution =
false;
196 UnalignedSymbols =
false;
197 for (
const auto &
Feature : Features) {
198 if (
Feature ==
"+transactional-execution")
199 HasTransactionalExecution =
true;
202 else if (
Feature ==
"+soft-float")
204 else if (
Feature ==
"+unaligned-symbols")
205 UnalignedSymbols =
true;
207 HasVector &= !SoftFloat;
246 return RegNo < 4 ? 6 + RegNo : -1;
252 return std::make_pair(256, 256);
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.
static StringRef getTriple(const Command &Job)
Defines the clang::TargetOptions class.
Concrete class used by the front-end to report problems and issues.
The type of a lookup table which maps from language-specific address spaces to target-specific ones.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
TargetInfo(const llvm::Triple &T)
const LangASMap * AddrSpaceMap
BuiltinVaListKind
The different kinds of __builtin_va_list types defined by the target implementation.
@ CharPtrBuiltinVaList
typedef char* __builtin_va_list;
unsigned HasBuiltinZOSVaList
unsigned HasUnalignedAccess
unsigned char MaxAtomicPromoteWidth
void resetDataLayout(StringRef DL)
Set the data layout to the given string.
unsigned getTargetAddressSpace(LangAS AS) const
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 ...
virtual std::string convertConstraint(const char *&Constraint) const
unsigned char MaxAtomicInlineWidth
Options for controlling the target.
bool hasBitIntType() const override
Determine whether the _BitInt type is supported on this target.
const char * getLongDoubleMangling() const override
Return the mangled code of long double.
uint64_t getPointerAlignV(LangAS AddrSpace) const override
bool isSPRegName(StringRef RegName) const override
std::string convertConstraint(const char *&Constraint) const override
bool isValidCPUName(StringRef Name) const override
Determine whether this TargetInfo supports the given CPU name.
ArrayRef< TargetInfo::GCCRegAlias > getGCCRegAliases() const override
bool handleTargetFeatures(std::vector< std::string > &Features, DiagnosticsEngine &Diags) override
Perform initialization based on the user configured set of features (e.g., +sse4).
CallingConvCheckResult checkCallingConvention(CallingConv CC) const override
Determines whether a given calling convention is valid for the target.
bool hasSjLjLowering() const override
Controls if __builtin_longjmp / __builtin_setjmp can be lowered to llvm.eh.sjlj.longjmp / llvm....
std::pair< unsigned, unsigned > hardwareInterferenceSizes() const override
The first value in the pair is the minimum offset between two objects to avoid false sharing (destruc...
void fillValidTuneCPUList(SmallVectorImpl< StringRef > &Values) const override
Fill a SmallVectorImpl with the valid values for tuning CPU.
BuiltinVaListKind getBuiltinVaListKind() const override
Returns the kind of __builtin_va_list type that should be used with this target.
uint64_t getPointerWidthV(LangAS AddrSpace) const override
int getEHDataRegisterNumber(unsigned RegNo) const override
Return the register number that __builtin_eh_return_regno would return with the specified argument.
int getISARevision(StringRef Name) const
std::string_view getClobbers() const override
Returns a string of target-specific clobbers, in LLVM format.
bool setCPU(StringRef Name) override
Target the specified CPU.
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 ...
StringRef getABI() const override
Get the ABI currently in use.
bool isValidTuneCPUName(StringRef Name) const override
Determine whether this TargetInfo supports the given CPU name for tuning.
void fillValidCPUList(SmallVectorImpl< StringRef > &Values) const override
Fill a SmallVectorImpl with the valid values to setCPU.
SystemZTargetInfo(const llvm::Triple &Triple, const TargetOptions &)
Defines the clang::TargetInfo interface.
static constexpr LangASMap ZOSAddressMap
The JSON file list parser is used to communicate input to InstallAPI.
LangAS
Defines the address space values used by the address space qualifier of QualType.
CallingConv
CallingConv - Specifies the calling convention that a function uses.
unsigned char PointerWidth
const llvm::fltSemantics * LongDoubleFormat
unsigned char LongLongAlign
unsigned char PointerAlign
unsigned char LongDoubleAlign
unsigned char LongDoubleWidth
unsigned char Int128Align
unsigned char LongLongWidth
unsigned char MinGlobalAlign
unsigned char DefaultAlignForAttributeAligned