1 //===- PTXInstPrinter.h - Convert PTX MCInst to assembly syntax -*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This class prints n PTX MCInst to a .ptx file.
12 //===----------------------------------------------------------------------===//
14 #ifndef PTXINSTPRINTER_H
15 #define PTXINSTPRINTER_H
17 #include "llvm/MC/MCInstPrinter.h"
18 #include "llvm/MC/MCSubtargetInfo.h"
24 class PTXInstPrinter : public MCInstPrinter {
26 PTXInstPrinter(const MCAsmInfo &MAI, const MCRegisterInfo &MRI,
27 const MCSubtargetInfo &STI);
29 virtual void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot);
30 virtual StringRef getOpcodeName(unsigned Opcode) const;
31 virtual void printRegName(raw_ostream &OS, unsigned RegNo) const;
33 static const char *getInstructionName(unsigned Opcode);
35 // Autogenerated by tblgen.
36 void printInstruction(const MCInst *MI, raw_ostream &O);
37 static const char *getRegisterName(unsigned RegNo);
39 void printPredicate(const MCInst *MI, raw_ostream &O);
40 void printCall(const MCInst *MI, raw_ostream &O);
41 void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
42 void printMemOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
43 void printRoundingMode(const MCInst *MI, unsigned OpNo, raw_ostream &O);