19 #include "llvm/ADT/StringSwitch.h" 21 using namespace clang;
25 #define BUILTIN(ID, TYPE, ATTRS) \ 26 {#ID, TYPE, ATTRS, nullptr, ALL_LANGUAGES, nullptr}, 27 #define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) \ 28 {#ID, TYPE, ATTRS, nullptr, ALL_LANGUAGES, FEATURE}, 29 #include "clang/Basic/BuiltinsSystemZ.def" 32 const char *
const SystemZTargetInfo::GCCRegNames[] = {
33 "r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
"r8",
"r9",
"r10",
34 "r11",
"r12",
"r13",
"r14",
"r15",
"f0",
"f2",
"f4",
"f6",
"f1",
"f3",
35 "f5",
"f7",
"f8",
"f10",
"f12",
"f14",
"f9",
"f11",
"f13",
"f15" 39 return llvm::makeArrayRef(GCCRegNames);
71 return llvm::StringSwitch<int>(Name)
72 .Cases(
"arch8",
"z10", 8)
73 .Cases(
"arch9",
"z196", 9)
74 .Cases(
"arch10",
"zEC12", 10)
75 .Cases(
"arch11",
"z13", 11)
76 .Cases(
"arch12",
"z14", 12)
81 return llvm::StringSwitch<bool>(Feature)
82 .Case(
"systemz",
true)
83 .Case(
"arch8", ISARevision >= 8)
84 .Case(
"arch9", ISARevision >= 9)
85 .Case(
"arch10", ISARevision >= 10)
86 .Case(
"arch11", ISARevision >= 11)
87 .Case(
"arch12", ISARevision >= 12)
88 .Case(
"htm", HasTransactionalExecution)
89 .Case(
"vx", HasVector)
100 Builder.
defineMacro(
"__ARCH__", Twine(ISARevision));
102 Builder.
defineMacro(
"__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1");
103 Builder.
defineMacro(
"__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2");
104 Builder.
defineMacro(
"__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4");
105 Builder.
defineMacro(
"__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8");
107 if (HasTransactionalExecution)
Defines the clang::MacroBuilder utility class.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
ArrayRef< Builtin::Info > getTargetBuiltins() const override
Return information about target-specific builtins for the current primary target, and info about whic...
Defines the clang::LangOptions interface.
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods --------------------——===//
Enumerates target-specific builtins in their own namespaces within namespace clang.
bool hasFeature(StringRef Feature) const override
Determine whether the given target has the given feature.
Dataflow Directional Tag Classes.
bool validateAsmConstraint(const char *&Name, TargetInfo::ConstraintInfo &info) const override
ArrayRef< const char * > getGCCRegNames() const override
void defineMacro(const Twine &Name, const Twine &Value="1")
Append a #define line for macro of the form "\#define Name Value\n".
int getISARevision(const StringRef &Name) const
Defines enum values for all the target-independent builtin functions.