13#ifndef LLVM_CLANG_LIB_BASIC_TARGETS_SPARC_H
14#define LLVM_CLANG_LIB_BASIC_TARGETS_SPARC_H
17#include "llvm/Support/Compiler.h"
18#include "llvm/TargetParser/Triple.h"
24 static const char *
const GCCRegNames[];
42 if (llvm::is_contained(Features,
"+soft-float"))
49 bool hasFeature(StringRef Feature)
const override;
56 return TargetInfo::VoidPtrBuiltinVaList;
129 CPUGeneration getCPUGeneration(CPUKind
Kind)
const;
131 CPUKind getCPUKind(StringRef Name)
const;
134 return getCPUKind(Name) != CK_GENERIC;
139 bool setCPU(
const std::string &Name)
override {
140 CPU = getCPUKind(Name);
141 return CPU != CK_GENERIC;
145 return std::make_pair(32, 32);
154 resetDataLayout(
"E-m:e-p:32:32-i64:64-i128:128-f128:64-n32-S64");
156 switch (getTriple().getOS()) {
158 SizeType = UnsignedInt;
159 IntPtrType = SignedInt;
160 PtrDiffType = SignedInt;
162 case llvm::Triple::NetBSD:
163 case llvm::Triple::OpenBSD:
164 SizeType = UnsignedLong;
165 IntPtrType = SignedLong;
166 PtrDiffType = SignedLong;
171 MaxAtomicPromoteWidth = 64;
172 if (getCPUGeneration(CPU) == CG_V9)
173 MaxAtomicInlineWidth = 64;
177 MaxAtomicInlineWidth = 32;
191 resetDataLayout(
"e-m:e-p:32:32-i64:64-i128:128-f128:64-n32-S64");
201 resetDataLayout(
"E-m:e-i64:64-i128:128-n32:64-S128");
203 LongWidth = LongAlign = PointerWidth = PointerAlign = 64;
206 if (getTriple().isOSOpenBSD())
207 IntMaxType = SignedLongLong;
209 IntMaxType = SignedLong;
210 Int64Type = IntMaxType;
214 LongDoubleWidth = 128;
215 LongDoubleAlign = 128;
217 LongDoubleFormat = &llvm::APFloat::IEEEquad();
218 MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64;
225 return getCPUGeneration(SparcTargetInfo::getCPUKind(Name)) == CG_V9;
230 bool setCPU(
const std::string &Name)
override {
231 if (!SparcTargetInfo::setCPU(Name))
233 return getCPUGeneration(CPU) == CG_V9;
enum clang::sema::@1712::IndirectLocalPathEntry::EntryKind Kind
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.
Defines the clang::TargetOptions class.
Concrete class used by the front-end to report problems and issues.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Exposes information about the current target.
BuiltinVaListKind
The different kinds of __builtin_va_list types defined by the target implementation.
Options for controlling the target.
bool isValidCPUName(StringRef Name) const override
Determine whether this TargetInfo supports the given CPU name.
ArrayRef< Builtin::Info > getTargetBuiltins() const override
Return information about target-specific builtins for the current primary target, and info about whic...
int getEHDataRegisterNumber(unsigned RegNo) const override
Return the register number that __builtin_eh_return_regno would return with the specified argument.
BuiltinVaListKind getBuiltinVaListKind() const override
Returns the kind of __builtin_va_list type that should be used with this target.
bool setCPU(const std::string &Name) override
Target the specified CPU.
bool handleTargetFeatures(std::vector< std::string > &Features, DiagnosticsEngine &Diags) override
Perform initialization based on the user configured set of features (e.g., +sse4).
std::string_view getClobbers() const override
Returns a string of target-specific clobbers, in LLVM format.
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...
bool validateAsmConstraint(const char *&Name, TargetInfo::ConstraintInfo &info) const override
SparcTargetInfo(const llvm::Triple &Triple, const TargetOptions &)
bool hasBitIntType() const override
Determine whether the _BitInt type is supported on this target.
SparcV8TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
SparcV8elTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
SparcV9TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
bool isValidCPUName(StringRef Name) const override
Determine whether this TargetInfo supports the given CPU name.
bool hasBitIntType() const override
Determine whether the _BitInt type is supported on this target.
bool setCPU(const std::string &Name) override
Target the specified CPU.
Defines the clang::TargetInfo interface.
The JSON file list parser is used to communicate input to InstallAPI.