1 | //===-- BPFMCTargetDesc.h - BPF 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 BPF specific target descriptions. |
10 | // |
11 | //===----------------------------------------------------------------------===// |
12 | |
13 | #ifndef LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCTARGETDESC_H |
14 | #define LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCTARGETDESC_H |
15 | |
16 | #include "llvm/Config/config.h" |
17 | #include "llvm/MC/MCContext.h" |
18 | #include "llvm/Support/DataTypes.h" |
19 | |
20 | #include <memory> |
21 | |
22 | namespace llvm { |
23 | class MCAsmBackend; |
24 | class MCCodeEmitter; |
25 | class MCContext; |
26 | class MCInstrInfo; |
27 | class MCObjectTargetWriter; |
28 | class MCRegisterInfo; |
29 | class MCSubtargetInfo; |
30 | class MCTargetOptions; |
31 | class Target; |
32 | |
33 | MCCodeEmitter *createBPFMCCodeEmitter(const MCInstrInfo &MCII, MCContext &Ctx); |
34 | MCCodeEmitter *createBPFbeMCCodeEmitter(const MCInstrInfo &MCII, |
35 | MCContext &Ctx); |
36 | |
37 | MCAsmBackend *createBPFAsmBackend(const Target &T, const MCSubtargetInfo &STI, |
38 | const MCRegisterInfo &MRI, |
39 | const MCTargetOptions &Options); |
40 | MCAsmBackend *createBPFbeAsmBackend(const Target &T, const MCSubtargetInfo &STI, |
41 | const MCRegisterInfo &MRI, |
42 | const MCTargetOptions &Options); |
43 | |
44 | std::unique_ptr<MCObjectTargetWriter> createBPFELFObjectWriter(uint8_t OSABI); |
45 | } // namespace llvm |
46 | |
47 | // Defines symbolic names for BPF registers. This defines a mapping from |
48 | // register name to register number. |
49 | // |
50 | #define GET_REGINFO_ENUM |
51 | #include "BPFGenRegisterInfo.inc" |
52 | |
53 | // Defines symbolic names for the BPF instructions. |
54 | // |
55 | #define GET_INSTRINFO_ENUM |
56 | #define GET_INSTRINFO_MC_HELPER_DECLS |
57 | #include "BPFGenInstrInfo.inc" |
58 | |
59 | #define GET_SUBTARGETINFO_ENUM |
60 | #include "BPFGenSubtargetInfo.inc" |
61 | |
62 | #endif |
63 |