]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/lib/Target/BPF/MCTargetDesc/BPFMCTargetDesc.h
Merge llvm, clang, lld, lldb, compiler-rt and libc++ r301441, and update
[FreeBSD/FreeBSD.git] / contrib / llvm / lib / Target / BPF / MCTargetDesc / BPFMCTargetDesc.h
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 MCTargetOptions;
29 class StringRef;
30 class Target;
31 class Triple;
32 class raw_ostream;
33 class raw_pwrite_stream;
34
35 Target &getTheBPFleTarget();
36 Target &getTheBPFbeTarget();
37 Target &getTheBPFTarget();
38
39 MCCodeEmitter *createBPFMCCodeEmitter(const MCInstrInfo &MCII,
40                                       const MCRegisterInfo &MRI,
41                                       MCContext &Ctx);
42 MCCodeEmitter *createBPFbeMCCodeEmitter(const MCInstrInfo &MCII,
43                                         const MCRegisterInfo &MRI,
44                                         MCContext &Ctx);
45
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);
52
53 MCObjectWriter *createBPFELFObjectWriter(raw_pwrite_stream &OS,
54                                          uint8_t OSABI, bool IsLittleEndian);
55 }
56
57 // Defines symbolic names for BPF registers.  This defines a mapping from
58 // register name to register number.
59 //
60 #define GET_REGINFO_ENUM
61 #include "BPFGenRegisterInfo.inc"
62
63 // Defines symbolic names for the BPF instructions.
64 //
65 #define GET_INSTRINFO_ENUM
66 #include "BPFGenInstrInfo.inc"
67
68 #define GET_SUBTARGETINFO_ENUM
69 #include "BPFGenSubtargetInfo.inc"
70
71 #endif