LLVM API Documentation

AMDGPUInstPrinter.h
Go to the documentation of this file.
00001 //===-- AMDGPUInstPrinter.h - AMDGPU MC Inst -> ASM interface ---*- 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 /// \file
00011 //===----------------------------------------------------------------------===//
00012 
00013 #ifndef LLVM_LIB_TARGET_R600_INSTPRINTER_AMDGPUINSTPRINTER_H
00014 #define LLVM_LIB_TARGET_R600_INSTPRINTER_AMDGPUINSTPRINTER_H
00015 
00016 #include "llvm/ADT/StringRef.h"
00017 #include "llvm/MC/MCInstPrinter.h"
00018 #include "llvm/Support/raw_ostream.h"
00019 
00020 namespace llvm {
00021 
00022 class AMDGPUInstPrinter : public MCInstPrinter {
00023 public:
00024   AMDGPUInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,
00025                      const MCRegisterInfo &MRI)
00026     : MCInstPrinter(MAI, MII, MRI) {}
00027 
00028   //Autogenerated by tblgen
00029   void printInstruction(const MCInst *MI, raw_ostream &O);
00030   static const char *getRegisterName(unsigned RegNo);
00031 
00032   void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot) override;
00033 
00034 private:
00035   void printU8ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00036   void printU16ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00037   void printU32ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00038   void printOffen(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00039   void printIdxen(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00040   void printAddr64(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00041   void printMBUFOffset(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00042   void printGLC(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00043   void printSLC(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00044   void printTFE(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00045   void printRegOperand(unsigned RegNo, raw_ostream &O);
00046   void printImmediate(uint32_t Imm, raw_ostream &O);
00047   void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00048   void printOperandAndMods(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00049   static void printInterpSlot(const MCInst *MI, unsigned OpNum, raw_ostream &O);
00050   void printMemOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00051   static void printIfSet(const MCInst *MI, unsigned OpNo, raw_ostream &O,
00052                          StringRef Asm, StringRef Default = "");
00053   static void printAbs(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00054   static void printClamp(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00055   static void printLiteral(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00056   static void printLast(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00057   static void printNeg(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00058   static void printOMOD(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00059   static void printRel(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00060   static void printUpdateExecMask(const MCInst *MI, unsigned OpNo,
00061                                   raw_ostream &O);
00062   static void printUpdatePred(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00063   static void printWrite(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00064   static void printSel(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00065   static void printBankSwizzle(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00066   static void printRSel(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00067   static void printCT(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00068   static void printKCache(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00069   static void printSendMsg(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00070   static void printWaitFlag(const MCInst *MI, unsigned OpNo, raw_ostream &O);
00071 };
00072 
00073 } // End namespace llvm
00074 
00075 #endif