16#include "llvm/ADT/StringSwitch.h"
21const char *
const SparcTargetInfo::GCCRegNames[] = {
23 "r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
"r8",
"r9",
"r10",
24 "r11",
"r12",
"r13",
"r14",
"r15",
"r16",
"r17",
"r18",
"r19",
"r20",
"r21",
25 "r22",
"r23",
"r24",
"r25",
"r26",
"r27",
"r28",
"r29",
"r30",
"r31",
28 "f0",
"f1",
"f2",
"f3",
"f4",
"f5",
"f6",
"f7",
"f8",
"f9",
"f10",
29 "f11",
"f12",
"f13",
"f14",
"f15",
"f16",
"f17",
"f18",
"f19",
"f20",
"f21",
30 "f22",
"f23",
"f24",
"f25",
"f26",
"f27",
"f28",
"f29",
"f30",
"f31",
"f32",
31 "f34",
"f36",
"f38",
"f40",
"f42",
"f44",
"f46",
"f48",
"f50",
"f52",
"f54",
32 "f56",
"f58",
"f60",
"f62",
40 {{
"g0"},
"r0"}, {{
"g1"},
"r1"}, {{
"g2"},
"r2"}, {{
"g3"},
"r3"},
41 {{
"g4"},
"r4"}, {{
"g5"},
"r5"}, {{
"g6"},
"r6"}, {{
"g7"},
"r7"},
42 {{
"o0"},
"r8"}, {{
"o1"},
"r9"}, {{
"o2"},
"r10"}, {{
"o3"},
"r11"},
43 {{
"o4"},
"r12"}, {{
"o5"},
"r13"}, {{
"o6",
"sp"},
"r14"}, {{
"o7"},
"r15"},
44 {{
"l0"},
"r16"}, {{
"l1"},
"r17"}, {{
"l2"},
"r18"}, {{
"l3"},
"r19"},
45 {{
"l4"},
"r20"}, {{
"l5"},
"r21"}, {{
"l6"},
"r22"}, {{
"l7"},
"r23"},
46 {{
"i0"},
"r24"}, {{
"i1"},
"r25"}, {{
"i2"},
"r26"}, {{
"i3"},
"r27"},
47 {{
"i4"},
"r28"}, {{
"i5"},
"r29"}, {{
"i6",
"fp"},
"r30"}, {{
"i7"},
"r31"},
55 return llvm::StringSwitch<bool>(Feature)
56 .Case(
"softfloat", SoftFloat)
113 llvm_unreachable(
"Unexpected CPU kind");
129 Values.push_back(Info.Name);
135 Builder.defineMacro(
"__REGISTER_PREFIX__",
"");
138 Builder.defineMacro(
"SOFT_FLOAT",
"1");
145 Builder.defineMacro(
"__sparcv8");
149 Builder.defineMacro(
"__sparcv8");
150 Builder.defineMacro(
"__sparcv8__");
153 Builder.defineMacro(
"__sparc_v9__");
158 Builder.defineMacro(
"__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1");
159 Builder.defineMacro(
"__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2");
160 Builder.defineMacro(
"__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4");
161 Builder.defineMacro(
"__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8");
168 Builder.defineMacro(
"__sparcv9");
169 Builder.defineMacro(
"__arch64__");
172 Builder.defineMacro(
"__sparc64__");
173 Builder.defineMacro(
"__sparc_v9__");
174 Builder.defineMacro(
"__sparcv9__");
177 Builder.defineMacro(
"__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1");
178 Builder.defineMacro(
"__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2");
179 Builder.defineMacro(
"__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4");
180 Builder.defineMacro(
"__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8");
186 if (Info.Generation ==
CG_V9)
187 Values.push_back(Info.Name);
static constexpr SparcCPUInfo CPUInfo[]
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...
const llvm::Triple & getTriple() const
Returns the target triple of the primary target.
bool hasFeature(StringRef Feature) const override
Determine whether the given target has the given feature.
ArrayRef< const char * > getGCCRegNames() const override
CPUGeneration getCPUGeneration(CPUKind Kind) const
CPUKind getCPUKind(StringRef Name) const
ArrayRef< TargetInfo::GCCRegAlias > getGCCRegAliases() const override
enum clang::targets::SparcTargetInfo::CPUKind CPU
void fillValidCPUList(SmallVectorImpl< StringRef > &Values) const override
Fill a SmallVectorImpl with the valid values to setCPU.
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
void fillValidCPUList(SmallVectorImpl< StringRef > &Values) const override
Fill a SmallVectorImpl with the valid values to setCPU.
void DefineStd(MacroBuilder &Builder, StringRef MacroName, const LangOptions &Opts)
DefineStd - Define a macro name and standard variants.
The JSON file list parser is used to communicate input to InstallAPI.
SparcTargetInfo::CPUKind Kind
SparcTargetInfo::CPUGeneration Generation