blob: c6fd053f6dcdb20d5d51b89c1b266cbadd7f2da4 [file] [log] [blame]
Tom Stellard75aadc22012-12-11 21:25:42 +00001//===-- AMDGPUInstPrinter.h - AMDGPU MC Inst -> ASM interface ---*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10/// \file
11//===----------------------------------------------------------------------===//
12
13#ifndef AMDGPUINSTPRINTER_H
14#define AMDGPUINSTPRINTER_H
15
16#include "llvm/ADT/StringRef.h"
17#include "llvm/MC/MCInstPrinter.h"
18#include "llvm/Support/raw_ostream.h"
19
20namespace llvm {
21
22class AMDGPUInstPrinter : public MCInstPrinter {
23public:
24 AMDGPUInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,
25 const MCRegisterInfo &MRI)
26 : MCInstPrinter(MAI, MII, MRI) {}
27
28 //Autogenerated by tblgen
29 void printInstruction(const MCInst *MI, raw_ostream &O);
30 static const char *getRegisterName(unsigned RegNo);
31
32 virtual void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot);
33
34private:
35 void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
Michel Danzere9bb18b2013-02-14 19:03:25 +000036 void printInterpSlot(const MCInst *MI, unsigned OpNum, raw_ostream &O);
Tom Stellard75aadc22012-12-11 21:25:42 +000037 void printMemOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
Vincent Lejeunef97af792013-05-02 21:52:30 +000038 void printIfSet(const MCInst *MI, unsigned OpNo, raw_ostream &O,
39 StringRef Asm, StringRef Default = "");
Tom Stellard75aadc22012-12-11 21:25:42 +000040 void printAbs(const MCInst *MI, unsigned OpNo, raw_ostream &O);
41 void printClamp(const MCInst *MI, unsigned OpNo, raw_ostream &O);
42 void printLiteral(const MCInst *MI, unsigned OpNo, raw_ostream &O);
43 void printLast(const MCInst *MI, unsigned OpNo, raw_ostream &O);
44 void printNeg(const MCInst *MI, unsigned OpNo, raw_ostream &O);
45 void printOMOD(const MCInst *MI, unsigned OpNo, raw_ostream &O);
46 void printRel(const MCInst *MI, unsigned OpNo, raw_ostream &O);
47 void printUpdateExecMask(const MCInst *MI, unsigned OpNo, raw_ostream &O);
48 void printUpdatePred(const MCInst *MI, unsigned OpNo, raw_ostream &O);
49 void printWrite(const MCInst *MI, unsigned OpNo, raw_ostream &O);
Tom Stellard365366f2013-01-23 02:09:06 +000050 void printSel(const MCInst *MI, unsigned OpNo, raw_ostream &O);
Vincent Lejeunef97af792013-05-02 21:52:30 +000051 void printBankSwizzle(const MCInst *MI, unsigned OpNo, raw_ostream &O);
Vincent Lejeuneb0422e22013-05-02 21:52:40 +000052 void printKCache(const MCInst *MI, unsigned OpNo, raw_ostream &O);
Tom Stellard75aadc22012-12-11 21:25:42 +000053};
54
55} // End namespace llvm
56
57#endif // AMDGPUINSTRPRINTER_H