18#include "llvm/ADT/StringSwitch.h"
24#define BUILTIN(ID, TYPE, ATTRS) \
25 {#ID, TYPE, ATTRS, nullptr, HeaderDesc::NO_HEADER, ALL_LANGUAGES},
26#define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) \
27 {#ID, TYPE, ATTRS, FEATURE, HeaderDesc::NO_HEADER, ALL_LANGUAGES},
28#include "clang/Basic/BuiltinsSystemZ.def"
31const char *
const SystemZTargetInfo::GCCRegNames[] = {
32 "r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
33 "r8",
"r9",
"r10",
"r11",
"r12",
"r13",
"r14",
"r15",
34 "f0",
"f2",
"f4",
"f6",
"f1",
"f3",
"f5",
"f7",
35 "f8",
"f10",
"f12",
"f14",
"f9",
"f11",
"f13",
"f15",
36 "",
"cc",
"",
"",
"a0",
"a1",
37 "v16",
"v18",
"v20",
"v22",
"v17",
"v19",
"v21",
"v23",
38 "v24",
"v26",
"v28",
"v30",
"v25",
"v27",
"v29",
"v31"
42 {{
"v0"}, 16}, {{
"v2"}, 17}, {{
"v4"}, 18}, {{
"v6"}, 19},
43 {{
"v1"}, 20}, {{
"v3"}, 21}, {{
"v5"}, 22}, {{
"v7"}, 23},
44 {{
"v8"}, 24}, {{
"v10"}, 25}, {{
"v12"}, 26}, {{
"v14"}, 27},
45 {{
"v9"}, 28}, {{
"v11"}, 29}, {{
"v13"}, 30}, {{
"v15"}, 31}
101 {{
"arch8"}, 8}, {{
"z10"}, 8},
102 {{
"arch9"}, 9}, {{
"z196"}, 9},
103 {{
"arch10"}, 10}, {{
"zEC12"}, 10},
104 {{
"arch11"}, 11}, {{
"z13"}, 11},
105 {{
"arch12"}, 12}, {{
"z14"}, 12},
106 {{
"arch13"}, 13}, {{
"z15"}, 13},
107 {{
"arch14"}, 14}, {{
"z16"}, 14},
113 return CR.
Name == Name;
117 return Rev->ISARevisionID;
123 Values.push_back(Rev.Name);
127 return llvm::StringSwitch<bool>(Feature)
128 .Case(
"systemz",
true)
129 .Case(
"arch8", ISARevision >= 8)
130 .Case(
"arch9", ISARevision >= 9)
131 .Case(
"arch10", ISARevision >= 10)
132 .Case(
"arch11", ISARevision >= 11)
133 .Case(
"arch12", ISARevision >= 12)
134 .Case(
"arch13", ISARevision >= 13)
135 .Case(
"arch14", ISARevision >= 14)
136 .Case(
"htm", HasTransactionalExecution)
137 .Case(
"vx", HasVector)
142 bool HasNonWeakDef)
const {
145 if (UnalignedSymbols && !HasNonWeakDef)
153 Builder.defineMacro(
"__s390__");
154 Builder.defineMacro(
"__s390x__");
155 Builder.defineMacro(
"__zarch__");
156 Builder.defineMacro(
"__LONG_DOUBLE_128__");
158 Builder.defineMacro(
"__ARCH__", Twine(ISARevision));
160 Builder.defineMacro(
"__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1");
161 Builder.defineMacro(
"__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2");
162 Builder.defineMacro(
"__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4");
163 Builder.defineMacro(
"__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8");
165 if (HasTransactionalExecution)
166 Builder.defineMacro(
"__HTM__");
168 Builder.defineMacro(
"__VX__");
170 Builder.defineMacro(
"__VEC__",
"10304");
const TargetInfo::AddlRegName GCCAddlRegNames[]
const TargetInfo::AddlRegName GCCAddlRegNames[]
static constexpr ISANameRevision ISARevisions[]
static constexpr Builtin::Info BuiltinInfo[]
static constexpr Builtin::Info BuiltinInfo[]
Defines enum values for all the target-independent builtin functions.
Defines the clang::LangOptions interface.
Defines the clang::MacroBuilder utility class.
Enumerates target-specific builtins in their own namespaces within namespace clang.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
bool validateAsmConstraint(const char *&Name, TargetInfo::ConstraintInfo &info) const override
unsigned getMinGlobalAlign(uint64_t Size, bool HasNonWeakDef) const override
getMinGlobalAlign - Return the minimum alignment of a global variable, unless its alignment is explic...
ArrayRef< TargetInfo::AddlRegName > getGCCAddlRegNames() const override
ArrayRef< const char * > getGCCRegNames() const override
bool hasFeature(StringRef Feature) const override
Determine whether the given target has the given feature.
int getISARevision(StringRef Name) const
ArrayRef< Builtin::Info > getTargetBuiltins() const override
Return information about target-specific builtins for the current primary target, and info about whic...
void fillValidCPUList(SmallVectorImpl< StringRef > &Values) const override
Fill a SmallVectorImpl with the valid values to setCPU.
The JSON file list parser is used to communicate input to InstallAPI.
unsigned char MinGlobalAlign