LLVM  3.7.0
AMDGPUInstPrinter.h
Go to the documentation of this file.
1 //===-- 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 LLVM_LIB_TARGET_R600_INSTPRINTER_AMDGPUINSTPRINTER_H
14 #define LLVM_LIB_TARGET_R600_INSTPRINTER_AMDGPUINSTPRINTER_H
15 
16 #include "llvm/ADT/StringRef.h"
17 #include "llvm/MC/MCInstPrinter.h"
19 
20 namespace llvm {
21 
23 public:
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  void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot,
33  const MCSubtargetInfo &STI) override;
34  static void printRegOperand(unsigned RegNo, raw_ostream &O,
35  const MCRegisterInfo &MRI);
36 
37 private:
38  void printU8ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
39  void printU16ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
40  void printU8ImmDecOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
41  void printU16ImmDecOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
42  void printU32ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
43  void printOffen(const MCInst *MI, unsigned OpNo, raw_ostream &O);
44  void printIdxen(const MCInst *MI, unsigned OpNo, raw_ostream &O);
45  void printAddr64(const MCInst *MI, unsigned OpNo, raw_ostream &O);
46  void printMBUFOffset(const MCInst *MI, unsigned OpNo, raw_ostream &O);
47  void printDSOffset(const MCInst *MI, unsigned OpNo, raw_ostream &O);
48  void printDSOffset0(const MCInst *MI, unsigned OpNo, raw_ostream &O);
49  void printDSOffset1(const MCInst *MI, unsigned OpNo, raw_ostream &O);
50  void printGDS(const MCInst *MI, unsigned OpNo, raw_ostream &O);
51  void printGLC(const MCInst *MI, unsigned OpNo, raw_ostream &O);
52  void printSLC(const MCInst *MI, unsigned OpNo, raw_ostream &O);
53  void printTFE(const MCInst *MI, unsigned OpNo, raw_ostream &O);
54  void printRegOperand(unsigned RegNo, raw_ostream &O);
55  void printVOPDst(const MCInst *MI, unsigned OpNo, raw_ostream &O);
56  void printImmediate32(uint32_t I, raw_ostream &O);
57  void printImmediate64(uint64_t I, raw_ostream &O);
58  void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
59  void printOperandAndMods(const MCInst *MI, unsigned OpNo, raw_ostream &O);
60  static void printInterpSlot(const MCInst *MI, unsigned OpNum, raw_ostream &O);
61  void printMemOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
62  static void printIfSet(const MCInst *MI, unsigned OpNo, raw_ostream &O,
64  static void printAbs(const MCInst *MI, unsigned OpNo, raw_ostream &O);
65  static void printClamp(const MCInst *MI, unsigned OpNo, raw_ostream &O);
66  static void printClampSI(const MCInst *MI, unsigned OpNo, raw_ostream &O);
67  static void printOModSI(const MCInst *MI, unsigned OpNo, raw_ostream &O);
68  static void printLiteral(const MCInst *MI, unsigned OpNo, raw_ostream &O);
69  static void printLast(const MCInst *MI, unsigned OpNo, raw_ostream &O);
70  static void printNeg(const MCInst *MI, unsigned OpNo, raw_ostream &O);
71  static void printOMOD(const MCInst *MI, unsigned OpNo, raw_ostream &O);
72  static void printRel(const MCInst *MI, unsigned OpNo, raw_ostream &O);
73  static void printUpdateExecMask(const MCInst *MI, unsigned OpNo,
74  raw_ostream &O);
75  static void printUpdatePred(const MCInst *MI, unsigned OpNo, raw_ostream &O);
76  static void printWrite(const MCInst *MI, unsigned OpNo, raw_ostream &O);
77  static void printSel(const MCInst *MI, unsigned OpNo, raw_ostream &O);
78  static void printBankSwizzle(const MCInst *MI, unsigned OpNo, raw_ostream &O);
79  static void printRSel(const MCInst *MI, unsigned OpNo, raw_ostream &O);
80  static void printCT(const MCInst *MI, unsigned OpNo, raw_ostream &O);
81  static void printKCache(const MCInst *MI, unsigned OpNo, raw_ostream &O);
82  static void printSendMsg(const MCInst *MI, unsigned OpNo, raw_ostream &O);
83  static void printWaitFlag(const MCInst *MI, unsigned OpNo, raw_ostream &O);
84 };
85 
86 } // End namespace llvm
87 
88 #endif
static void printRegOperand(unsigned RegNo, raw_ostream &O, const MCRegisterInfo &MRI)
void printInstruction(const MCInst *MI, raw_ostream &O)
AMDGPUInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI)
static const char * getRegisterName(unsigned RegNo)
Instances of this class represent a single low-level machine instruction.
Definition: MCInst.h:150
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
This class is intended to be used as a base class for asm properties and features specific to the tar...
Definition: MCAsmInfo.h:58
Interface to description of machine instruction set.
Definition: MCInstrInfo.h:24
const MCAsmInfo & MAI
Definition: MCInstPrinter.h:44
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
Definition: MCInstPrinter.h:38
#define I(x, y, z)
Definition: MD5.cpp:54
void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot, const MCSubtargetInfo &STI) override
Print the specified MCInst to the specified raw_ostream.
MCSubtargetInfo - Generic base class for all target subtargets.
const MCInstrInfo & MII
Definition: MCInstPrinter.h:45
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:38
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:40
const MCRegisterInfo & MRI
Definition: MCInstPrinter.h:46