13 #ifndef LLVM_CLANG_LIB_BASIC_TARGETS_ARM_H 14 #define LLVM_CLANG_LIB_BASIC_TARGETS_ARM_H 19 #include "llvm/ADT/Triple.h" 20 #include "llvm/Support/Compiler.h" 21 #include "llvm/Support/TargetParser.h" 42 enum HWDivMode { HWDivThumb = (1 << 0), HWDivARM = (1 << 1) };
44 static bool FPUModeIsVFP(FPUMode Mode) {
45 return Mode & (VFP2FPU | VFP3FPU | VFP4FPU | NeonFPU | FPARMV8);
56 enum { FP_Default, FP_VFP, FP_Neon } FPMath;
58 llvm::ARM::ISAKind ArchISA;
59 llvm::ARM::ArchKind ArchKind = llvm::ARM::ArchKind::ARMV4T;
60 llvm::ARM::ProfileKind ArchProfile;
70 unsigned SoftFloat : 1;
71 unsigned SoftFloatABI : 1;
76 unsigned Unaligned : 1;
99 void setABIAPCS(
bool IsAAPCS16);
102 void setArchInfo(llvm::ARM::ArchKind
Kind);
106 bool isThumb()
const;
107 bool supportsThumb()
const;
108 bool supportsThumb2()
const;
110 bool hasMVEFloat()
const;
112 StringRef getCPUAttr()
const;
113 StringRef getCPUProfile()
const;
118 StringRef getABI()
const override;
119 bool setABI(
const std::string &Name)
override;
125 const std::vector<std::string> &FeaturesVec)
const override;
130 return Feature !=
"soft-float-abi";
133 bool handleTargetFeatures(std::vector<std::string> &Features,
136 bool hasFeature(StringRef Feature)
const override;
138 bool isValidCPUName(StringRef Name)
const override;
141 bool setCPU(
const std::string &Name)
override;
143 bool setFPMath(StringRef Name)
override;
149 void getTargetDefinesARMV81A(
const LangOptions &Opts,
151 void getTargetDefinesARMV82A(
const LangOptions &Opts,
153 void getTargetDefinesARMV83A(
const LangOptions &Opts,
160 bool isCLZForZeroUndef()
const override;
165 bool validateAsmConstraint(
const char *&Name,
167 std::string convertConstraint(
const char *&Constraint)
const override;
169 validateConstraintModifier(StringRef Constraint,
char Modifier,
unsigned Size,
170 std::string &SuggestedModifier)
const override;
171 const char *getClobbers()
const override;
174 StringRef Expression)
const override {
180 int getEHDataRegisterNumber(
unsigned RegNo)
const override;
182 bool hasSjLjLowering()
const override;
201 const llvm::Triple Triple;
206 void getVisualStudioDefines(
const LangOptions &Opts,
257 void getOSDefines(
const LangOptions &Opts,
const llvm::Triple &Triple,
278 #endif // LLVM_CLANG_LIB_BASIC_TARGETS_ARM_H static const Builtin::Info BuiltinInfo[]
StringRef getConstraintRegister(StringRef Constraint, StringRef Expression) const override
Extracts a register from the passed constraint (if it is a single-register constraint) and the asm la...
Options for controlling the target.
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[]
bool isValidFeatureName(StringRef Feature) const override
Determine whether this TargetInfo supports the given feature.
Exposes information about the current target.
bool useFP16ConversionIntrinsics() const override
Check whether llvm intrinsics such as llvm.convert.to.fp16 should be used to convert to and from __fp...
CallingConv
CallingConv - Specifies the calling convention that a function uses.
OpenMPLinearClauseKind Modifier
Modifier of 'linear' clause.
Defines the clang::TargetOptions class.
Dataflow Directional Tag Classes.
BuiltinVaListKind
The different kinds of __builtin_va_list types defined by the target implementation.
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::TargetInfo interface.