]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.h
Merge clang 7.0.1 and several follow-up changes
[FreeBSD/FreeBSD.git] / contrib / llvm / lib / Target / Hexagon / MCTargetDesc / HexagonMCTargetDesc.h
1 //===-- HexagonMCTargetDesc.h - Hexagon Target Descriptions -----*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file provides Hexagon specific target descriptions.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_LIB_TARGET_HEXAGON_MCTARGETDESC_HEXAGONMCTARGETDESC_H
15 #define LLVM_LIB_TARGET_HEXAGON_MCTARGETDESC_HEXAGONMCTARGETDESC_H
16
17 #include "llvm/Support/CommandLine.h"
18 #include <cstdint>
19 #include <string>
20
21 namespace llvm {
22
23 struct InstrItinerary;
24 struct InstrStage;
25 class FeatureBitset;
26 class MCAsmBackend;
27 class MCCodeEmitter;
28 class MCContext;
29 class MCInstrInfo;
30 class MCObjectTargetWriter;
31 class MCRegisterInfo;
32 class MCSubtargetInfo;
33 class MCTargetOptions;
34 class Target;
35 class Triple;
36 class StringRef;
37 class raw_ostream;
38 class raw_pwrite_stream;
39
40 Target &getTheHexagonTarget();
41 extern cl::opt<bool> HexagonDisableCompound;
42 extern cl::opt<bool> HexagonDisableDuplex;
43 extern const InstrStage HexagonStages[];
44
45 MCInstrInfo *createHexagonMCInstrInfo();
46 MCRegisterInfo *createHexagonMCRegisterInfo(StringRef TT);
47
48 namespace Hexagon_MC {
49   StringRef selectHexagonCPU(StringRef CPU);
50
51   FeatureBitset completeHVXFeatures(const FeatureBitset &FB);
52   /// Create a Hexagon MCSubtargetInfo instance. This is exposed so Asm parser,
53   /// etc. do not need to go through TargetRegistry.
54   MCSubtargetInfo *createHexagonMCSubtargetInfo(const Triple &TT, StringRef CPU,
55                                                 StringRef FS);
56   unsigned GetELFFlags(const MCSubtargetInfo &STI);
57 }
58
59 MCCodeEmitter *createHexagonMCCodeEmitter(const MCInstrInfo &MCII,
60                                           const MCRegisterInfo &MRI,
61                                           MCContext &MCT);
62
63 MCAsmBackend *createHexagonAsmBackend(const Target &T,
64                                       const MCSubtargetInfo &STI,
65                                       const MCRegisterInfo &MRI,
66                                       const MCTargetOptions &Options);
67
68 std::unique_ptr<MCObjectTargetWriter>
69 createHexagonELFObjectWriter(uint8_t OSABI, StringRef CPU);
70
71 unsigned HexagonGetLastSlot();
72
73 } // End llvm namespace
74
75 // Define symbolic names for Hexagon registers.  This defines a mapping from
76 // register name to register number.
77 //
78 #define GET_REGINFO_ENUM
79 #include "HexagonGenRegisterInfo.inc"
80
81 // Defines symbolic names for the Hexagon instructions.
82 //
83 #define GET_INSTRINFO_ENUM
84 #define GET_INSTRINFO_SCHED_ENUM
85 #include "HexagonGenInstrInfo.inc"
86
87 #define GET_SUBTARGETINFO_ENUM
88 #include "HexagonGenSubtargetInfo.inc"
89
90 #endif // LLVM_LIB_TARGET_HEXAGON_MCTARGETDESC_HEXAGONMCTARGETDESC_H