1*9880d681SAndroid Build Coastguard Worker //= NVPTXInstPrinter.h - Convert NVPTX MCInst to assembly syntax --*- C++ -*-=// 2*9880d681SAndroid Build Coastguard Worker // 3*9880d681SAndroid Build Coastguard Worker // The LLVM Compiler Infrastructure 4*9880d681SAndroid Build Coastguard Worker // 5*9880d681SAndroid Build Coastguard Worker // This file is distributed under the University of Illinois Open Source 6*9880d681SAndroid Build Coastguard Worker // License. See LICENSE.TXT for details. 7*9880d681SAndroid Build Coastguard Worker // 8*9880d681SAndroid Build Coastguard Worker //===----------------------------------------------------------------------===// 9*9880d681SAndroid Build Coastguard Worker // 10*9880d681SAndroid Build Coastguard Worker // This class prints an NVPTX MCInst to .ptx file syntax. 11*9880d681SAndroid Build Coastguard Worker // 12*9880d681SAndroid Build Coastguard Worker //===----------------------------------------------------------------------===// 13*9880d681SAndroid Build Coastguard Worker 14*9880d681SAndroid Build Coastguard Worker #ifndef LLVM_LIB_TARGET_NVPTX_INSTPRINTER_NVPTXINSTPRINTER_H 15*9880d681SAndroid Build Coastguard Worker #define LLVM_LIB_TARGET_NVPTX_INSTPRINTER_NVPTXINSTPRINTER_H 16*9880d681SAndroid Build Coastguard Worker 17*9880d681SAndroid Build Coastguard Worker #include "llvm/MC/MCInstPrinter.h" 18*9880d681SAndroid Build Coastguard Worker 19*9880d681SAndroid Build Coastguard Worker namespace llvm { 20*9880d681SAndroid Build Coastguard Worker 21*9880d681SAndroid Build Coastguard Worker class MCSubtargetInfo; 22*9880d681SAndroid Build Coastguard Worker 23*9880d681SAndroid Build Coastguard Worker class NVPTXInstPrinter : public MCInstPrinter { 24*9880d681SAndroid Build Coastguard Worker public: 25*9880d681SAndroid Build Coastguard Worker NVPTXInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII, 26*9880d681SAndroid Build Coastguard Worker const MCRegisterInfo &MRI); 27*9880d681SAndroid Build Coastguard Worker 28*9880d681SAndroid Build Coastguard Worker void printRegName(raw_ostream &OS, unsigned RegNo) const override; 29*9880d681SAndroid Build Coastguard Worker void printInst(const MCInst *MI, raw_ostream &OS, StringRef Annot, 30*9880d681SAndroid Build Coastguard Worker const MCSubtargetInfo &STI) override; 31*9880d681SAndroid Build Coastguard Worker 32*9880d681SAndroid Build Coastguard Worker // Autogenerated by tblgen. 33*9880d681SAndroid Build Coastguard Worker void printInstruction(const MCInst *MI, raw_ostream &O); 34*9880d681SAndroid Build Coastguard Worker static const char *getRegisterName(unsigned RegNo); 35*9880d681SAndroid Build Coastguard Worker // End 36*9880d681SAndroid Build Coastguard Worker 37*9880d681SAndroid Build Coastguard Worker void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O); 38*9880d681SAndroid Build Coastguard Worker void printCvtMode(const MCInst *MI, int OpNum, raw_ostream &O, 39*9880d681SAndroid Build Coastguard Worker const char *Modifier = nullptr); 40*9880d681SAndroid Build Coastguard Worker void printCmpMode(const MCInst *MI, int OpNum, raw_ostream &O, 41*9880d681SAndroid Build Coastguard Worker const char *Modifier = nullptr); 42*9880d681SAndroid Build Coastguard Worker void printLdStCode(const MCInst *MI, int OpNum, 43*9880d681SAndroid Build Coastguard Worker raw_ostream &O, const char *Modifier = nullptr); 44*9880d681SAndroid Build Coastguard Worker void printMemOperand(const MCInst *MI, int OpNum, 45*9880d681SAndroid Build Coastguard Worker raw_ostream &O, const char *Modifier = nullptr); 46*9880d681SAndroid Build Coastguard Worker void printProtoIdent(const MCInst *MI, int OpNum, 47*9880d681SAndroid Build Coastguard Worker raw_ostream &O, const char *Modifier = nullptr); 48*9880d681SAndroid Build Coastguard Worker }; 49*9880d681SAndroid Build Coastguard Worker 50*9880d681SAndroid Build Coastguard Worker } 51*9880d681SAndroid Build Coastguard Worker 52*9880d681SAndroid Build Coastguard Worker #endif 53