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 StringRef; 29 class Target; 30 class Triple; 31 class raw_ostream; 32 class raw_pwrite_stream; 33 34 extern Target TheBPFleTarget; 35 extern Target TheBPFbeTarget; 36 extern Target TheBPFTarget; 37 38 MCCodeEmitter *createBPFMCCodeEmitter(const MCInstrInfo &MCII, 39 const MCRegisterInfo &MRI, 40 MCContext &Ctx); 41 MCCodeEmitter *createBPFbeMCCodeEmitter(const MCInstrInfo &MCII, 42 const MCRegisterInfo &MRI, 43 MCContext &Ctx); 44 45 MCAsmBackend *createBPFAsmBackend(const Target &T, const MCRegisterInfo &MRI, 46 const Triple &TT, StringRef CPU); 47 MCAsmBackend *createBPFbeAsmBackend(const Target &T, const MCRegisterInfo &MRI, 48 const Triple &TT, StringRef CPU); 49 50 MCObjectWriter *createBPFELFObjectWriter(raw_pwrite_stream &OS, 51 uint8_t OSABI, bool IsLittleEndian); 52 } 53 54 // Defines symbolic names for BPF registers. This defines a mapping from 55 // register name to register number. 56 // 57 #define GET_REGINFO_ENUM 58 #include "BPFGenRegisterInfo.inc" 59 60 // Defines symbolic names for the BPF instructions. 61 // 62 #define GET_INSTRINFO_ENUM 63 #include "BPFGenInstrInfo.inc" 64 65 #define GET_SUBTARGETINFO_ENUM 66 #include "BPFGenSubtargetInfo.inc" 67 68 #endif 69