BPFMCTargetDesc.h revision 288943
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 StringRef;
29class Target;
30class Triple;
31class raw_ostream;
32class raw_pwrite_stream;
33
34extern Target TheBPFleTarget;
35extern Target TheBPFbeTarget;
36extern Target TheBPFTarget;
37
38MCCodeEmitter *createBPFMCCodeEmitter(const MCInstrInfo &MCII,
39                                      const MCRegisterInfo &MRI,
40                                      MCContext &Ctx);
41MCCodeEmitter *createBPFbeMCCodeEmitter(const MCInstrInfo &MCII,
42                                        const MCRegisterInfo &MRI,
43                                        MCContext &Ctx);
44
45MCAsmBackend *createBPFAsmBackend(const Target &T, const MCRegisterInfo &MRI,
46                                  const Triple &TT, StringRef CPU);
47MCAsmBackend *createBPFbeAsmBackend(const Target &T, const MCRegisterInfo &MRI,
48                                    const Triple &TT, StringRef CPU);
49
50MCObjectWriter *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