Path: blob/main/contrib/llvm-project/llvm/lib/Target/BPF/MCTargetDesc/BPFMCTargetDesc.h
35294 views
//===-- BPFMCTargetDesc.h - BPF Target Descriptions -------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file provides BPF specific target descriptions.9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCTARGETDESC_H13#define LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCTARGETDESC_H1415#include "llvm/Config/config.h"16#include "llvm/MC/MCContext.h"17#include "llvm/Support/DataTypes.h"1819#include <memory>2021namespace llvm {22class MCAsmBackend;23class MCCodeEmitter;24class MCContext;25class MCInstrInfo;26class MCObjectTargetWriter;27class MCRegisterInfo;28class MCSubtargetInfo;29class MCTargetOptions;30class Target;3132MCCodeEmitter *createBPFMCCodeEmitter(const MCInstrInfo &MCII, MCContext &Ctx);33MCCodeEmitter *createBPFbeMCCodeEmitter(const MCInstrInfo &MCII,34MCContext &Ctx);3536MCAsmBackend *createBPFAsmBackend(const Target &T, const MCSubtargetInfo &STI,37const MCRegisterInfo &MRI,38const MCTargetOptions &Options);39MCAsmBackend *createBPFbeAsmBackend(const Target &T, const MCSubtargetInfo &STI,40const MCRegisterInfo &MRI,41const MCTargetOptions &Options);4243std::unique_ptr<MCObjectTargetWriter> createBPFELFObjectWriter(uint8_t OSABI);44} // namespace llvm4546// Defines symbolic names for BPF registers. This defines a mapping from47// register name to register number.48//49#define GET_REGINFO_ENUM50#include "BPFGenRegisterInfo.inc"5152// Defines symbolic names for the BPF instructions.53//54#define GET_INSTRINFO_ENUM55#define GET_INSTRINFO_MC_HELPER_DECLS56#include "BPFGenInstrInfo.inc"5758#define GET_SUBTARGETINFO_ENUM59#include "BPFGenSubtargetInfo.inc"6061#endif626364