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/Support/DataTypes.h"
18 #include "llvm/Config/config.h"
27 class MCSubtargetInfo;
28 class MCTargetOptions;
33 class raw_pwrite_stream;
35 Target &getTheBPFleTarget();
36 Target &getTheBPFbeTarget();
37 Target &getTheBPFTarget();
39 MCCodeEmitter *createBPFMCCodeEmitter(const MCInstrInfo &MCII,
40 const MCRegisterInfo &MRI,
42 MCCodeEmitter *createBPFbeMCCodeEmitter(const MCInstrInfo &MCII,
43 const MCRegisterInfo &MRI,
46 MCAsmBackend *createBPFAsmBackend(const Target &T, const MCRegisterInfo &MRI,
47 const Triple &TT, StringRef CPU,
48 const MCTargetOptions &Options);
49 MCAsmBackend *createBPFbeAsmBackend(const Target &T, const MCRegisterInfo &MRI,
50 const Triple &TT, StringRef CPU,
51 const MCTargetOptions &Options);
53 MCObjectWriter *createBPFELFObjectWriter(raw_pwrite_stream &OS,
54 uint8_t OSABI, bool IsLittleEndian);
57 // Defines symbolic names for BPF registers. This defines a mapping from
58 // register name to register number.
60 #define GET_REGINFO_ENUM
61 #include "BPFGenRegisterInfo.inc"
63 // Defines symbolic names for the BPF instructions.
65 #define GET_INSTRINFO_ENUM
66 #include "BPFGenInstrInfo.inc"
68 #define GET_SUBTARGETINFO_ENUM
69 #include "BPFGenSubtargetInfo.inc"