14 #ifndef LLVM_CLANG_LIB_BASIC_TARGETS_SPARC_H 15 #define LLVM_CLANG_LIB_BASIC_TARGETS_SPARC_H 18 #include "llvm/ADT/Triple.h" 19 #include "llvm/Support/Compiler.h" 43 auto Feature = std::find(Features.begin(), Features.end(),
"+soft-float");
44 if (Feature != Features.end()) {
52 bool hasFeature(StringRef Feature)
const override;
142 case CK_SPARCLITE86X:
157 case CK_LEON2_AT697E:
158 case CK_LEON2_AT697F:
161 case CK_LEON3_GR712RC:
174 llvm_unreachable(
"Unexpected CPU kind");
177 CPUKind getCPUKind(StringRef Name)
const;
180 return getCPUKind(Name) != CK_GENERIC;
183 bool setCPU(
const std::string &Name)
override {
184 CPU = getCPUKind(Name);
185 return CPU != CK_GENERIC;
194 resetDataLayout(
"E-m:e-p:32:32-i64:64-f128:64-n32-S64");
196 switch (getTriple().getOS()) {
198 SizeType = UnsignedInt;
199 IntPtrType = SignedInt;
200 PtrDiffType = SignedInt;
202 case llvm::Triple::NetBSD:
203 case llvm::Triple::OpenBSD:
204 SizeType = UnsignedLong;
205 IntPtrType = SignedLong;
206 PtrDiffType = SignedLong;
211 MaxAtomicPromoteWidth = 64;
212 MaxAtomicInlineWidth = 32;
226 resetDataLayout(
"e-m:e-p:32:32-i64:64-f128:64-n32-S64");
236 resetDataLayout(
"E-m:e-i64:64-n32:64-S128");
238 LongWidth = LongAlign = PointerWidth = PointerAlign = 64;
241 if (getTriple().getOS() == llvm::Triple::OpenBSD)
242 IntMaxType = SignedLongLong;
244 IntMaxType = SignedLong;
245 Int64Type = IntMaxType;
249 LongDoubleWidth = 128;
250 LongDoubleAlign = 128;
251 LongDoubleFormat = &llvm::APFloat::IEEEquad();
252 MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64;
262 bool setCPU(
const std::string &Name)
override {
265 return getCPUGeneration(CPU) == CG_V9;
270 #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...
CPUGeneration getCPUGeneration(CPUKind Kind) const
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)