1 //===-- BPFMCTargetDesc.h - BPF Target Descriptions -------------*- 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 provides BPF specific target descriptions.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCTARGETDESC_H
15 #define LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCTARGETDESC_H
17 #include "llvm/Config/config.h"
18 #include "llvm/Support/DataTypes.h"
29 class MCSubtargetInfo;
30 class MCTargetOptions;
35 class raw_pwrite_stream;
37 Target &getTheBPFleTarget();
38 Target &getTheBPFbeTarget();
39 Target &getTheBPFTarget();
41 MCCodeEmitter *createBPFMCCodeEmitter(const MCInstrInfo &MCII,
42 const MCRegisterInfo &MRI,
44 MCCodeEmitter *createBPFbeMCCodeEmitter(const MCInstrInfo &MCII,
45 const MCRegisterInfo &MRI,
48 MCAsmBackend *createBPFAsmBackend(const Target &T, const MCSubtargetInfo &STI,
49 const MCRegisterInfo &MRI,
50 const MCTargetOptions &Options);
51 MCAsmBackend *createBPFbeAsmBackend(const Target &T, const MCSubtargetInfo &STI,
52 const MCRegisterInfo &MRI,
53 const MCTargetOptions &Options);
55 std::unique_ptr<MCObjectWriter> createBPFELFObjectWriter(raw_pwrite_stream &OS,
60 // Defines symbolic names for BPF registers. This defines a mapping from
61 // register name to register number.
63 #define GET_REGINFO_ENUM
64 #include "BPFGenRegisterInfo.inc"
66 // Defines symbolic names for the BPF instructions.
68 #define GET_INSTRINFO_ENUM
69 #include "BPFGenInstrInfo.inc"
71 #define GET_SUBTARGETINFO_ENUM
72 #include "BPFGenSubtargetInfo.inc"