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