1 //===-- TargetParser - Parser for target features ---------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file implements a target parser to recognise hardware features such as
11 // FPU/CPU/ARCH names as well as specific support such as HDIV, etc.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_SUPPORT_TARGETPARSER_H
16 #define LLVM_SUPPORT_TARGETPARSER_H
21 // Target specific information into their own namespaces. These should be
22 // generated from TableGen because the information is already there, and there
23 // is where new information about targets will be added.
24 // FIXME: To TableGen this we need to make some table generated files available
25 // even if the back-end is not compiled with LLVM, plus we need to create a new
26 // back-end to TableGen to create these clean tables.
42 FK_CRYPTO_NEON_FP_ARMV8,
72 // Non-standard Arch names.
85 // Arch extension modifiers for CPUs.
100 // Target Parsers, one per architecture.
101 class ARMTargetParser {
102 static StringRef getFPUSynonym(StringRef FPU);
103 static StringRef getArchSynonym(StringRef Arch);
106 static StringRef getCanonicalArchName(StringRef Arch);
109 static const char * getFPUName(unsigned FPUKind);
110 static const char * getArchName(unsigned ArchKind);
111 static unsigned getArchDefaultCPUArch(unsigned ArchKind);
112 static const char * getArchDefaultCPUName(unsigned ArchKind);
113 static const char * getArchExtName(unsigned ArchExtKind);
114 static const char * getDefaultCPU(StringRef Arch);
117 static unsigned parseFPU(StringRef FPU);
118 static unsigned parseArch(StringRef Arch);
119 static unsigned parseArchExt(StringRef ArchExt);
120 static unsigned parseCPUArch(StringRef CPU);