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,
77 // Arch extension modifiers for CPUs.
92 // Target Parsers, one per architecture.
93 class ARMTargetParser {
94 static StringRef getFPUSynonym(StringRef FPU);
95 static StringRef getArchSynonym(StringRef Arch);
99 static const char * getFPUName(unsigned ID);
100 static const char * getArchName(unsigned ID);
101 static unsigned getArchDefaultCPUArch(unsigned ID);
102 static const char * getArchDefaultCPUName(unsigned ID);
103 static const char * getArchExtName(unsigned ID);
106 static unsigned parseFPU(StringRef FPU);
107 static unsigned parseArch(StringRef Arch);
108 static unsigned parseArchExt(StringRef ArchExt);