brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · f12b795 Raw
63 lines · c
1//===-- BPFMCTargetDesc.h - BPF Target Descriptions -------------*- C++ -*-===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8//9// This file provides BPF specific target descriptions.10//11//===----------------------------------------------------------------------===//12 13#ifndef LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCTARGETDESC_H14#define LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCTARGETDESC_H15 16#include "llvm/Config/config.h"17#include "llvm/MC/MCContext.h"18#include "llvm/Support/DataTypes.h"19 20#include <memory>21 22namespace llvm {23class MCAsmBackend;24class MCCodeEmitter;25class MCContext;26class MCInstrInfo;27class MCObjectTargetWriter;28class MCRegisterInfo;29class MCSubtargetInfo;30class MCTargetOptions;31class Target;32 33MCCodeEmitter *createBPFMCCodeEmitter(const MCInstrInfo &MCII, MCContext &Ctx);34MCCodeEmitter *createBPFbeMCCodeEmitter(const MCInstrInfo &MCII,35                                        MCContext &Ctx);36 37MCAsmBackend *createBPFAsmBackend(const Target &T, const MCSubtargetInfo &STI,38                                  const MCRegisterInfo &MRI,39                                  const MCTargetOptions &Options);40MCAsmBackend *createBPFbeAsmBackend(const Target &T, const MCSubtargetInfo &STI,41                                    const MCRegisterInfo &MRI,42                                    const MCTargetOptions &Options);43 44std::unique_ptr<MCObjectTargetWriter> createBPFELFObjectWriter(uint8_t OSABI);45} // namespace llvm46 47// Defines symbolic names for BPF registers.  This defines a mapping from48// register name to register number.49//50#define GET_REGINFO_ENUM51#include "BPFGenRegisterInfo.inc"52 53// Defines symbolic names for the BPF instructions.54//55#define GET_INSTRINFO_ENUM56#define GET_INSTRINFO_MC_HELPER_DECLS57#include "BPFGenInstrInfo.inc"58 59#define GET_SUBTARGETINFO_ENUM60#include "BPFGenSubtargetInfo.inc"61 62#endif63