56 {
"crypto-neon-fp-armv8",
245 return FPUNames[
FPUKind].FPUVersion;
251 return FPUNames[
FPUKind].NeonSupport;
257 return FPUNames[
FPUKind].Restriction;
261 std::vector<const char *> &
Features) {
268 switch (FPUNames[FPUKind].Restriction) {
270 Features.push_back(
"+fp-only-sp");
271 Features.push_back(
"+d16");
274 Features.push_back(
"-fp-only-sp");
275 Features.push_back(
"+d16");
278 Features.push_back(
"-fp-only-sp");
279 Features.push_back(
"-d16");
289 Features.push_back(
"+fp-armv8");
292 Features.push_back(
"+vfp4");
293 Features.push_back(
"-fp-armv8");
296 Features.push_back(
"+vfp3");
297 Features.push_back(
"+fp16");
298 Features.push_back(
"-vfp4");
299 Features.push_back(
"-fp-armv8");
302 Features.push_back(
"+vfp3");
303 Features.push_back(
"-fp16");
304 Features.push_back(
"-vfp4");
305 Features.push_back(
"-fp-armv8");
308 Features.push_back(
"+vfp2");
309 Features.push_back(
"-vfp3");
310 Features.push_back(
"-fp16");
311 Features.push_back(
"-vfp4");
312 Features.push_back(
"-fp-armv8");
315 Features.push_back(
"-vfp2");
316 Features.push_back(
"-vfp3");
317 Features.push_back(
"-fp16");
318 Features.push_back(
"-vfp4");
319 Features.push_back(
"-fp-armv8");
324 switch (FPUNames[FPUKind].NeonSupport) {
326 Features.push_back(
"+crypto");
329 Features.push_back(
"+neon");
330 Features.push_back(
"-crypto");
333 Features.push_back(
"-neon");
334 Features.push_back(
"-crypto");
362 return ARCHNames[
ArchKind].ArchAttr;
377 for (
const auto CPU : CPUNames) {
378 if (CPU.ArchID == AK && CPU.Default)
390 .Cases(
"fpa",
"fpe2",
"fpe3",
"maverick",
"invalid")
391 .
Case(
"vfp2",
"vfpv2")
392 .
Case(
"vfp3",
"vfpv3")
393 .
Case(
"vfp4",
"vfpv4")
394 .
Case(
"vfp3-d16",
"vfpv3-d16")
395 .
Case(
"vfp4-d16",
"vfpv4-d16")
396 .
Cases(
"fp4-sp-d16",
"vfpv4-sp-d16",
"fpv4-sp-d16")
397 .
Cases(
"fp4-dp-d16",
"fpv4-dp-d16",
"vfpv4-d16")
398 .
Case(
"fp5-sp-d16",
"fpv5-sp-d16")
399 .
Cases(
"fp5-dp-d16",
"fpv5-dp-d16",
"fpv5-d16")
401 .
Case(
"neon-vfpv3",
"neon")
407 .Case(
"v6sm",
"v6s-m")
412 .
Case(
"v7em",
"v7e-m")
413 .
Cases(
"v8",
"v8a",
"aarch64",
"arm64",
"v8-a")
414 .
Case(
"v8.1a",
"v8.1-a")
439 if (A.
substr(offset,3) ==
"_be")
460 if (A[0] !=
'v' || !std::isdigit(A[1]))
473 for (
const auto F : FPUNames) {
484 for (
const auto A : ARCHNames) {
492 for (
const auto A : ARCHExtNames) {
493 if (ArchExt ==
A.Name)
500 for (
const auto C : CPUNames) {
static unsigned getFPUVersion(unsigned FPUKind)
size_t size() const
size - Get the string size.
static unsigned parseCPUArch(StringRef CPU)
static unsigned parseArch(StringRef Arch)
static unsigned parseArchExt(StringRef ArchExt)
size_t find(char C, size_t From=0) const
Search for the first character C in the string.
bool endswith(StringRef Suffix) const
Check if this string ends with the given Suffix.
static const char * getSubArch(unsigned ArchKind)
const FeatureBitset Features
StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
StringSwitch & Case(const char(&S)[N], const T &Value)
static unsigned parseFPU(StringRef FPU)
static bool getFPUFeatures(unsigned FPUKind, std::vector< const char * > &Features)
Only single-precision instructions, with 16 D registers.
A switch()-like statement whose cases are string literals.
static const char * getDefaultCPU(StringRef Arch)
static unsigned getArchAttr(unsigned ArchKind)
static unsigned parseArchVersion(StringRef Arch)
static const char * getCPUAttr(unsigned ArchKind)
static unsigned getFPUNeonSupportLevel(unsigned FPUKind)
StringSwitch & StartsWith(const char(&S)[N], const T &Value)
bool startswith(StringRef Prefix) const
Check if this string starts with the given Prefix.
static unsigned parseArchEndian(StringRef Arch)
static const char * getFPUName(unsigned FPUKind)
R Default(const T &Value) const
static const char * getArchExtName(unsigned ArchExtKind)
static unsigned parseArchProfile(StringRef Arch)
static unsigned parseArchISA(StringRef Arch)
static const char * getArchName(unsigned ArchKind)
static unsigned getFPURestriction(unsigned FPUKind)
StringSwitch & Cases(const char(&S0)[N0], const char(&S1)[N1], const T &Value)
StringRef - Represent a constant reference to a string, i.e.
static StringRef getCanonicalArchName(StringRef Arch)
bool empty() const
empty - Check if the string is empty.