Path: blob/main/contrib/llvm-project/llvm/lib/Target/BPF/MCTargetDesc/BPFInstPrinter.h
35294 views
//===-- BPFInstPrinter.h - Convert BPF MCInst to asm syntax -------*- 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 class prints a BPF MCInst to a .s file.9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFINSTPRINTER_H13#define LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFINSTPRINTER_H1415#include "llvm/MC/MCInstPrinter.h"1617namespace llvm {18class BPFInstPrinter : public MCInstPrinter {19public:20BPFInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,21const MCRegisterInfo &MRI)22: MCInstPrinter(MAI, MII, MRI) {}2324void printInst(const MCInst *MI, uint64_t Address, StringRef Annot,25const MCSubtargetInfo &STI, raw_ostream &O) override;26void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O,27const char *Modifier = nullptr);28void printMemOperand(const MCInst *MI, int OpNo, raw_ostream &O,29const char *Modifier = nullptr);30void printImm64Operand(const MCInst *MI, unsigned OpNo, raw_ostream &O);31void printBrTargetOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);3233// Autogenerated by tblgen.34std::pair<const char *, uint64_t> getMnemonic(const MCInst *MI) override;35void printInstruction(const MCInst *MI, uint64_t Address, raw_ostream &O);36static const char *getRegisterName(MCRegister Reg);37};38}3940#endif414243