BPFInstPrinter.h revision 283625
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 MCOperand;
21283625Sdim
22283625Sdimclass BPFInstPrinter : public MCInstPrinter {
23283625Sdimpublic:
24283625Sdim  BPFInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,
25283625Sdim                 const MCRegisterInfo &MRI)
26283625Sdim      : MCInstPrinter(MAI, MII, MRI) {}
27283625Sdim
28283625Sdim  void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot,
29283625Sdim                 const MCSubtargetInfo &STI) override;
30283625Sdim  void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O,
31283625Sdim                    const char *Modifier = nullptr);
32283625Sdim  void printMemOperand(const MCInst *MI, int OpNo, raw_ostream &O,
33283625Sdim                       const char *Modifier = nullptr);
34283625Sdim  void printImm64Operand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
35283625Sdim
36283625Sdim  // Autogenerated by tblgen.
37283625Sdim  void printInstruction(const MCInst *MI, raw_ostream &O);
38283625Sdim  static const char *getRegisterName(unsigned RegNo);
39283625Sdim};
40283625Sdim}
41283625Sdim
42283625Sdim#endif
43