1 | //===-- SparcMCTargetDesc.h - Sparc Target Descriptions ---------*- C++ -*-===// |
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | // |
9 | // This file provides Sparc specific target descriptions. |
10 | // |
11 | //===----------------------------------------------------------------------===// |
12 | |
13 | #ifndef LLVM_LIB_TARGET_SPARC_MCTARGETDESC_SPARCMCTARGETDESC_H |
14 | #define LLVM_LIB_TARGET_SPARC_MCTARGETDESC_SPARCMCTARGETDESC_H |
15 | |
16 | #include "llvm/ADT/StringRef.h" |
17 | #include "llvm/Support/DataTypes.h" |
18 | |
19 | #include <memory> |
20 | |
21 | namespace llvm { |
22 | class MCAsmBackend; |
23 | class MCCodeEmitter; |
24 | class MCContext; |
25 | class MCInstrInfo; |
26 | class MCObjectTargetWriter; |
27 | class MCRegisterInfo; |
28 | class MCSubtargetInfo; |
29 | class MCTargetOptions; |
30 | class Target; |
31 | |
32 | MCCodeEmitter *createSparcMCCodeEmitter(const MCInstrInfo &MCII, |
33 | MCContext &Ctx); |
34 | MCAsmBackend *createSparcAsmBackend(const Target &T, const MCSubtargetInfo &STI, |
35 | const MCRegisterInfo &MRI, |
36 | const MCTargetOptions &Options); |
37 | std::unique_ptr<MCObjectTargetWriter> |
38 | createSparcELFObjectWriter(bool Is64Bit, bool HasV9, uint8_t OSABI); |
39 | |
40 | // Defines symbolic names for Sparc v9 ASI tag names. |
41 | namespace SparcASITag { |
42 | struct ASITag { |
43 | const char *Name; |
44 | const char *AltName; |
45 | unsigned Encoding; |
46 | }; |
47 | |
48 | #define GET_ASITagsList_DECL |
49 | #include "SparcGenSearchableTables.inc" |
50 | } // end namespace SparcASITag |
51 | |
52 | // Defines symbolic names for Sparc v9 prefetch tag names. |
53 | namespace SparcPrefetchTag { |
54 | struct PrefetchTag { |
55 | const char *Name; |
56 | unsigned Encoding; |
57 | }; |
58 | |
59 | #define GET_PrefetchTagsList_DECL |
60 | #include "SparcGenSearchableTables.inc" |
61 | } // end namespace SparcPrefetchTag |
62 | } // End llvm namespace |
63 | |
64 | // Defines symbolic names for Sparc registers. This defines a mapping from |
65 | // register name to register number. |
66 | // |
67 | #define GET_REGINFO_ENUM |
68 | #include "SparcGenRegisterInfo.inc" |
69 | |
70 | // Defines symbolic names for the Sparc instructions. |
71 | // |
72 | #define GET_INSTRINFO_ENUM |
73 | #define GET_INSTRINFO_MC_HELPER_DECLS |
74 | #include "SparcGenInstrInfo.inc" |
75 | |
76 | #define GET_SUBTARGETINFO_ENUM |
77 | #include "SparcGenSubtargetInfo.inc" |
78 | |
79 | #endif |
80 | |