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 MCInstrInfo &MII,
27 const MCRegisterInfo &MRI, const MCSubtargetInfo &STI);
29 virtual void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot);
30 virtual void printRegName(raw_ostream &OS, unsigned RegNo) const;
32 // Autogenerated by tblgen.
33 void printInstruction(const MCInst *MI, raw_ostream &O);
34 static const char *getRegisterName(unsigned RegNo);
36 void printPredicate(const MCInst *MI, raw_ostream &O);
37 void printCall(const MCInst *MI, raw_ostream &O);
38 void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
39 void printMemOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
40 void printRoundingMode(const MCInst *MI, unsigned OpNo, raw_ostream &O);