BPFMCTargetDesc.h revision 283625
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 20namespace llvm { 21class MCAsmBackend; 22class MCCodeEmitter; 23class MCContext; 24class MCInstrInfo; 25class MCObjectWriter; 26class MCRegisterInfo; 27class MCSubtargetInfo; 28class Target; 29class StringRef; 30class raw_ostream; 31class raw_pwrite_stream; 32 33extern Target TheBPFTarget; 34 35MCCodeEmitter *createBPFMCCodeEmitter(const MCInstrInfo &MCII, 36 const MCRegisterInfo &MRI, 37 MCContext &Ctx); 38 39MCAsmBackend *createBPFAsmBackend(const Target &T, const MCRegisterInfo &MRI, 40 StringRef TT, StringRef CPU); 41 42MCObjectWriter *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