BPFMCTargetDesc.h revision 285181
12061Sjkh//===-- BPFMCTargetDesc.h - BPF Target Descriptions -------------*- C++ -*-===//
239726Sjb//
32061Sjkh//                     The LLVM Compiler Infrastructure
438666Sjb//
532427Sjb// This file is distributed under the University of Illinois Open Source
638666Sjb// License. See LICENSE.TXT for details.
738666Sjb//
838666Sjb//===----------------------------------------------------------------------===//
938666Sjb//
1038666Sjb// This file provides BPF specific target descriptions.
1138666Sjb//
1238666Sjb//===----------------------------------------------------------------------===//
1338666Sjb
1438666Sjb#ifndef LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCTARGETDESC_H
1538666Sjb#define LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCTARGETDESC_H
1638666Sjb
1738666Sjb#include "llvm/Support/DataTypes.h"
1838978Sjb#include "llvm/Config/config.h"
1938978Sjb
2032427Sjbnamespace llvm {
2138666Sjbclass MCAsmBackend;
2238666Sjbclass MCCodeEmitter;
2338666Sjbclass MCContext;
2438666Sjbclass MCInstrInfo;
2538666Sjbclass MCObjectWriter;
2638666Sjbclass MCRegisterInfo;
2717308Speterclass MCSubtargetInfo;
2838666Sjbclass StringRef;
2938666Sjbclass Target;
3038666Sjbclass Triple;
3119175Sbdeclass raw_ostream;
3238666Sjbclass raw_pwrite_stream;
3338666Sjb
3438042Sbdeextern Target TheBPFleTarget;
3539726Sjbextern Target TheBPFbeTarget;
3638666Sjbextern Target TheBPFTarget;
3738666Sjb
3838042SbdeMCCodeEmitter *createBPFMCCodeEmitter(const MCInstrInfo &MCII,
3938666Sjb                                      const MCRegisterInfo &MRI,
4038666Sjb                                      MCContext &Ctx);
4117308SpeterMCCodeEmitter *createBPFbeMCCodeEmitter(const MCInstrInfo &MCII,
4238666Sjb                                        const MCRegisterInfo &MRI,
4338666Sjb                                        MCContext &Ctx);
4438666Sjb
4538666SjbMCAsmBackend *createBPFAsmBackend(const Target &T, const MCRegisterInfo &MRI,
4617308Speter                                  const Triple &TT, StringRef CPU);
4738666SjbMCAsmBackend *createBPFbeAsmBackend(const Target &T, const MCRegisterInfo &MRI,
4838666Sjb                                    const Triple &TT, StringRef CPU);
4938666Sjb
5038666SjbMCObjectWriter *createBPFELFObjectWriter(raw_pwrite_stream &OS,
5138666Sjb                                         uint8_t OSABI, bool IsLittleEndian);
5238666Sjb}
5317308Speter
5438666Sjb// Defines symbolic names for BPF registers.  This defines a mapping from
5538666Sjb// register name to register number.
5638666Sjb//
5738666Sjb#define GET_REGINFO_ENUM
5838666Sjb#include "BPFGenRegisterInfo.inc"
5938666Sjb
6017308Speter// Defines symbolic names for the BPF instructions.
6138666Sjb//
6217308Speter#define GET_INSTRINFO_ENUM
6338666Sjb#include "BPFGenInstrInfo.inc"
6417308Speter
6527910Sasami#define GET_SUBTARGETINFO_ENUM
6638666Sjb#include "BPFGenSubtargetInfo.inc"
6738666Sjb
6838666Sjb#endif
6927910Sasami