13 #ifndef LLVM_CLANG_LIB_BASIC_TARGETS_SPARC_H 14 #define LLVM_CLANG_LIB_BASIC_TARGETS_SPARC_H 17 #include "llvm/ADT/Triple.h" 18 #include "llvm/Support/Compiler.h" 42 auto Feature = llvm::find(Features,
"+soft-float");
43 if (Feature != Features.end()) {
51 bool hasFeature(StringRef Feature)
const override;
135 CPUKind getCPUKind(StringRef Name)
const;
138 return getCPUKind(Name) != CK_GENERIC;
143 bool setCPU(
const std::string &Name)
override {
144 CPU = getCPUKind(Name);
145 return CPU != CK_GENERIC;
154 resetDataLayout(
"E-m:e-p:32:32-i64:64-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 MaxAtomicInlineWidth = 32;
186 resetDataLayout(
"e-m:e-p:32:32-i64:64-f128:64-n32-S64");
196 resetDataLayout(
"E-m:e-i64:64-n32:64-S128");
198 LongWidth = LongAlign = PointerWidth = PointerAlign = 64;
201 if (getTriple().isOSOpenBSD())
202 IntMaxType = SignedLongLong;
204 IntMaxType = SignedLong;
205 Int64Type = IntMaxType;
209 LongDoubleWidth = 128;
210 LongDoubleAlign = 128;
211 LongDoubleFormat = &llvm::APFloat::IEEEquad();
212 MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64;
224 bool setCPU(
const std::string &Name)
override {
227 return getCPUGeneration(CPU) == CG_V9;
232 #endif // LLVM_CLANG_LIB_BASIC_TARGETS_SPARC_H
int getEHDataRegisterNumber(unsigned RegNo) const override
Return the register number that __builtin_eh_return_regno would return with the specified argument...
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...
Options for controlling the target.
bool handleTargetFeatures(std::vector< std::string > &Features, DiagnosticsEngine &Diags) override
Perform initialization based on the user configured set of features (e.g., +sse4).
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Concrete class used by the front-end to report problems and issues.
static const char *const GCCRegNames[]
SparcV8elTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
bool setCPU(const std::string &Name) override
Target the specified CPU.
typedef void* __builtin_va_list;
Exposes information about the current target.
bool hasSjLjLowering() const override
Controls if __builtin_longjmp / __builtin_setjmp can be lowered to llvm.eh.sjlj.longjmp / llvm...
bool setCPU(const std::string &Name) override
Target the specified CPU.
SparcV9TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
Defines the clang::TargetOptions class.
bool isValidCPUName(StringRef Name) const override
brief Determine whether this TargetInfo supports the given CPU name.
bool hasSjLjLowering() const override
Controls if __builtin_longjmp / __builtin_setjmp can be lowered to llvm.eh.sjlj.longjmp / llvm...
SparcTargetInfo(const llvm::Triple &Triple, const TargetOptions &)
Dataflow Directional Tag Classes.
bool isValidCPUName(StringRef Name) const override
brief Determine whether this TargetInfo supports the given CPU name.
bool validateAsmConstraint(const char *&Name, TargetInfo::ConstraintInfo &info) const override
BuiltinVaListKind getBuiltinVaListKind() const override
Returns the kind of __builtin_va_list type that should be used with this target.
BuiltinVaListKind
The different kinds of __builtin_va_list types defined by the target implementation.
ArrayRef< Builtin::Info > getTargetBuiltins() const override
Return information about target-specific builtins for the current primary target, and info about whic...
const char * getClobbers() const override
Returns a string of target-specific clobbers, in LLVM format.
Defines the clang::TargetInfo interface.
CPUKind getCPUKind(StringRef Name) const
SparcV8TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)