13#ifndef LLVM_CLANG_LIB_BASIC_TARGETS_AARCH64_H
14#define LLVM_CLANG_LIB_BASIC_TARGETS_AARCH64_H
18#include "llvm/TargetParser/AArch64TargetParser.h"
53 virtual void setDataLayout() = 0;
55 static const char *
const GCCRegNames[];
63 unsigned FPU = FPUMode;
69 bool HasFullFP16 =
false;
70 bool HasDotProd =
false;
71 bool HasFP16FML =
false;
74 bool HasPAuth =
false;
76 bool HasRandGen =
false;
77 bool HasMatMul =
false;
78 bool HasBFloat16 =
false;
80 bool HasSVE2p1 =
false;
81 bool HasSVEAES =
false;
82 bool HasSVE2SHA3 =
false;
83 bool HasSVE2SM4 =
false;
84 bool HasSVEB16B16 =
false;
85 bool HasSVE2BitPerm =
false;
86 bool HasMatmulFP64 =
false;
87 bool HasMatmulFP32 =
false;
89 bool HasFlagM =
false;
90 bool HasAlternativeNZCV =
false;
98 bool HasFRInt3264 =
false;
100 bool HasSME2 =
false;
101 bool HasSMEF64F64 =
false;
102 bool HasSMEI16I64 =
false;
103 bool HasSMEF16F16 =
false;
104 bool HasSMEB16B16 =
false;
105 bool HasSME2p1 =
false;
107 bool HasPredRes =
false;
108 bool HasSSBS =
false;
110 bool HasWFxT =
false;
111 bool HasJSCVT =
false;
112 bool HasFCMA =
false;
113 bool HasNoFP =
false;
114 bool HasNoNeon =
false;
115 bool HasNoSVE =
false;
118 bool HasRCPC3 =
false;
119 bool HasSMEFA64 =
false;
120 bool HasPAuthLR =
false;
122 const llvm::AArch64::ArchInfo *ArchInfo = &llvm::AArch64::ARMV8A;
129 StringRef getABI()
const override;
130 bool setABI(
const std::string &Name)
override;
132 bool validateBranchProtection(StringRef Spec, StringRef Arch,
134 StringRef &Err)
const override;
136 bool isValidCPUName(StringRef Name)
const override;
138 bool setCPU(
const std::string &Name)
override;
146 void setArchFeatures();
148 void getTargetDefinesARMV81A(
const LangOptions &Opts,
150 void getTargetDefinesARMV82A(
const LangOptions &Opts,
152 void getTargetDefinesARMV83A(
const LangOptions &Opts,
154 void getTargetDefinesARMV84A(
const LangOptions &Opts,
156 void getTargetDefinesARMV85A(
const LangOptions &Opts,
158 void getTargetDefinesARMV86A(
const LangOptions &Opts,
160 void getTargetDefinesARMV87A(
const LangOptions &Opts,
162 void getTargetDefinesARMV88A(
const LangOptions &Opts,
164 void getTargetDefinesARMV89A(
const LangOptions &Opts,
166 void getTargetDefinesARMV9A(
const LangOptions &Opts,
168 void getTargetDefinesARMV91A(
const LangOptions &Opts,
170 void getTargetDefinesARMV92A(
const LangOptions &Opts,
172 void getTargetDefinesARMV93A(
const LangOptions &Opts,
174 void getTargetDefinesARMV94A(
const LangOptions &Opts,
176 void getTargetDefinesARMV95A(
const LangOptions &Opts,
178 void getTargetDefinesARMV96A(
const LangOptions &Opts,
185 std::optional<std::pair<unsigned, unsigned>>
186 getVScaleRange(
const LangOptions &LangOpts)
const override;
187 bool doesFeatureAffectCodeGen(StringRef Name)
const override;
188 bool validateCpuSupports(StringRef FeatureStr)
const override;
189 bool hasFeature(StringRef Feature)
const override;
190 void setFeatureEnabled(llvm::StringMap<bool> &Features, StringRef Name,
191 bool Enabled)
const override;
192 bool handleTargetFeatures(std::vector<std::string> &Features,
199 bool hasBFloat16Type()
const override;
201 CallingConvCheckResult checkCallingConvention(
CallingConv CC)
const override;
203 bool isCLZForZeroUndef()
const override;
205 BuiltinVaListKind getBuiltinVaListKind()
const override;
210 std::string convertConstraint(
const char *&Constraint)
const override;
212 bool validateAsmConstraint(
const char *&Name,
215 validateConstraintModifier(StringRef Constraint,
char Modifier,
unsigned Size,
216 std::string &SuggestedModifier)
const override;
217 std::string_view getClobbers()
const override;
224 int getEHDataRegisterNumber(
unsigned RegNo)
const override;
226 bool validatePointerAuthKey(
const llvm::APSInt &value)
const override;
229 bool hasInt128Type()
const override;
235 bool validateGlobalRegisterVariable(StringRef RegName,
unsigned RegSize,
236 bool &HasSizeMismatch)
const override;
239 if (AddrSpace == LangAS::ptr32_sptr || AddrSpace == LangAS::ptr32_uptr)
241 if (AddrSpace == LangAS::ptr64)
247 return getPointerWidthV(AddrSpace);
258 void setDataLayout()
override;
263 const llvm::Triple Triple;
269 void setDataLayout()
override;
271 BuiltinVaListKind getBuiltinVaListKind()
const override;
273 CallingConvCheckResult checkCallingConvention(
CallingConv CC)
const override;
286 getCallingConvKind(
bool ClangABICompat4)
const override;
288 unsigned getMinGlobalAlign(uint64_t TypeSize,
289 bool HasNonWeakDef)
const override;
306 void setDataLayout()
override;
314 BuiltinVaListKind getBuiltinVaListKind()
const override;
317 void getOSDefines(
const LangOptions &Opts,
const llvm::Triple &Triple,
static unsigned getFMVPriority(const TargetInfo &TI, const CodeGenFunction::FMVResolverOption &RO)
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.
Enumerates target-specific builtins in their own namespaces within namespace clang.
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.
Options for controlling the target.
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...
bool useFP16ConversionIntrinsics() const override
Check whether llvm intrinsics such as llvm.convert.to.fp16 should be used to convert to and from __fp...
uint64_t getPointerWidthV(LangAS AddrSpace) const override
bool supportsTargetAttributeTune() const override
Determine whether this TargetInfo supports tune in target attribute.
const char * getBFloat16Mangling() const override
Return the mangled code of bfloat.
bool checkArithmeticFenceSupported() const override
Controls if __arithmetic_fence is supported in the targeted backend.
bool hasBitIntType() const override
Determine whether the _BitInt type is supported on this target.
bool supportsCpuSupports() const override
uint64_t getPointerAlignV(LangAS AddrSpace) const override
static const unsigned ARM64AddrSpaceMap[]
The JSON file list parser is used to communicate input to InstallAPI.
LangAS
Defines the address space values used by the address space qualifier of QualType.
CallingConv
CallingConv - Specifies the calling convention that a function uses.
Contains information gathered from parsing the contents of TargetAttr.