1283625Sdim//===-- BPFInstPrinter.h - Convert BPF MCInst to asm syntax -------*- C++ -*--//
2283625Sdim//
3283625Sdim//                     The LLVM Compiler Infrastructure
4283625Sdim//
5283625Sdim// This file is distributed under the University of Illinois Open Source
6283625Sdim// License. See LICENSE.TXT for details.
7283625Sdim//
8283625Sdim//===----------------------------------------------------------------------===//
9283625Sdim//
10283625Sdim// This class prints a BPF MCInst to a .s file.
11283625Sdim//
12283625Sdim//===----------------------------------------------------------------------===//
13283625Sdim
14283625Sdim#ifndef LLVM_LIB_TARGET_BPF_INSTPRINTER_BPFINSTPRINTER_H
15283625Sdim#define LLVM_LIB_TARGET_BPF_INSTPRINTER_BPFINSTPRINTER_H
16283625Sdim
17283625Sdim#include "llvm/MC/MCInstPrinter.h"
18283625Sdim
19283625Sdimnamespace llvm {
20283625Sdimclass BPFInstPrinter : public MCInstPrinter {
21283625Sdimpublic:
22283625Sdim  BPFInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,
23283625Sdim                 const MCRegisterInfo &MRI)
24283625Sdim      : MCInstPrinter(MAI, MII, MRI) {}
25283625Sdim
26283625Sdim  void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot,
27283625Sdim                 const MCSubtargetInfo &STI) override;
28283625Sdim  void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O,
29283625Sdim                    const char *Modifier = nullptr);
30283625Sdim  void printMemOperand(const MCInst *MI, int OpNo, raw_ostream &O,
31283625Sdim                       const char *Modifier = nullptr);
32283625Sdim  void printImm64Operand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
33283625Sdim
34283625Sdim  // Autogenerated by tblgen.
35283625Sdim  void printInstruction(const MCInst *MI, raw_ostream &O);
36283625Sdim  static const char *getRegisterName(unsigned RegNo);
37283625Sdim};
38285181Sdim}
39283625Sdim
40283625Sdim#endif
41