LLVM API Documentation

NVPTXInstPrinter.h
Go to the documentation of this file.
00001 //= NVPTXInstPrinter.h - Convert NVPTX MCInst to assembly syntax --*- C++ -*-=//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This class prints an NVPTX MCInst to .ptx file syntax.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef LLVM_LIB_TARGET_NVPTX_INSTPRINTER_NVPTXINSTPRINTER_H
00015 #define LLVM_LIB_TARGET_NVPTX_INSTPRINTER_NVPTXINSTPRINTER_H
00016 
00017 #include "llvm/MC/MCInstPrinter.h"
00018 #include "llvm/Support/raw_ostream.h"
00019 
00020 namespace llvm {
00021 
00022 class MCOperand;
00023 class MCSubtargetInfo;
00024 
00025 class NVPTXInstPrinter : public MCInstPrinter {
00026 public:
00027   NVPTXInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,
00028                    const MCRegisterInfo &MRI, const MCSubtargetInfo &STI);
00029 
00030   void printRegName(raw_ostream &OS, unsigned RegNo) const override;
00031   void printInst(const MCInst *MI, raw_ostream &OS, StringRef Annot) override;
00032 
00033   // Autogenerated by tblgen.
00034   void printInstruction(const MCInst *MI, raw_ostream &O);
00035   static const char *getRegisterName(unsigned RegNo);
00036   // End
00037 
00038   void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00039   void printCvtMode(const MCInst *MI, int OpNum, raw_ostream &O,
00040                     const char *Modifier = nullptr);
00041   void printCmpMode(const MCInst *MI, int OpNum, raw_ostream &O,
00042                     const char *Modifier = nullptr);
00043   void printLdStCode(const MCInst *MI, int OpNum,
00044                      raw_ostream &O, const char *Modifier = nullptr);
00045   void printMemOperand(const MCInst *MI, int OpNum,
00046                        raw_ostream &O, const char *Modifier = nullptr);
00047   void printProtoIdent(const MCInst *MI, int OpNum,
00048                        raw_ostream &O, const char *Modifier = nullptr);
00049 };
00050 
00051 }
00052 
00053 #endif