1 //===-- AMDGPUInstPrinter.h - AMDGPU MC Inst -> ASM interface ---*- 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 //===----------------------------------------------------------------------===//
11 //===----------------------------------------------------------------------===//
13 #ifndef AMDGPUINSTPRINTER_H
14 #define AMDGPUINSTPRINTER_H
16 #include "llvm/ADT/StringRef.h"
17 #include "llvm/MC/MCInstPrinter.h"
18 #include "llvm/Support/raw_ostream.h"
22 class AMDGPUInstPrinter : public MCInstPrinter {
24 AMDGPUInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,
25 const MCRegisterInfo &MRI)
26 : MCInstPrinter(MAI, MII, MRI) {}
28 //Autogenerated by tblgen
29 void printInstruction(const MCInst *MI, raw_ostream &O);
30 static const char *getRegisterName(unsigned RegNo);
32 virtual void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot);
35 void printRegOperand(unsigned RegNo, raw_ostream &O);
36 void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
37 void printInterpSlot(const MCInst *MI, unsigned OpNum, raw_ostream &O);
38 void printMemOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
39 void printIfSet(const MCInst *MI, unsigned OpNo, raw_ostream &O,
40 StringRef Asm, StringRef Default = "");
41 void printAbs(const MCInst *MI, unsigned OpNo, raw_ostream &O);
42 void printClamp(const MCInst *MI, unsigned OpNo, raw_ostream &O);
43 void printLiteral(const MCInst *MI, unsigned OpNo, raw_ostream &O);
44 void printLast(const MCInst *MI, unsigned OpNo, raw_ostream &O);
45 void printNeg(const MCInst *MI, unsigned OpNo, raw_ostream &O);
46 void printOMOD(const MCInst *MI, unsigned OpNo, raw_ostream &O);
47 void printRel(const MCInst *MI, unsigned OpNo, raw_ostream &O);
48 void printUpdateExecMask(const MCInst *MI, unsigned OpNo, raw_ostream &O);
49 void printUpdatePred(const MCInst *MI, unsigned OpNo, raw_ostream &O);
50 void printWrite(const MCInst *MI, unsigned OpNo, raw_ostream &O);
51 void printSel(const MCInst *MI, unsigned OpNo, raw_ostream &O);
52 void printBankSwizzle(const MCInst *MI, unsigned OpNo, raw_ostream &O);
53 void printRSel(const MCInst *MI, unsigned OpNo, raw_ostream &O);
54 void printCT(const MCInst *MI, unsigned OpNo, raw_ostream &O);
55 void printKCache(const MCInst *MI, unsigned OpNo, raw_ostream &O);
56 void printWaitFlag(const MCInst *MI, unsigned OpNo, raw_ostream &O);
59 } // End namespace llvm
61 #endif // AMDGPUINSTRPRINTER_H