2012-12-11 21:25:42 +00:00
|
|
|
//===-- AMDGPUInstPrinter.h - AMDGPU MC Inst -> ASM interface ---*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
/// \file
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-13 16:26:38 +00:00
|
|
|
#ifndef LLVM_LIB_TARGET_R600_INSTPRINTER_AMDGPUINSTPRINTER_H
|
|
|
|
#define LLVM_LIB_TARGET_R600_INSTPRINTER_AMDGPUINSTPRINTER_H
|
2012-12-11 21:25:42 +00:00
|
|
|
|
|
|
|
#include "llvm/ADT/StringRef.h"
|
|
|
|
#include "llvm/MC/MCInstPrinter.h"
|
|
|
|
#include "llvm/Support/raw_ostream.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class AMDGPUInstPrinter : public MCInstPrinter {
|
|
|
|
public:
|
|
|
|
AMDGPUInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,
|
|
|
|
const MCRegisterInfo &MRI)
|
|
|
|
: MCInstPrinter(MAI, MII, MRI) {}
|
|
|
|
|
|
|
|
//Autogenerated by tblgen
|
|
|
|
void printInstruction(const MCInst *MI, raw_ostream &O);
|
|
|
|
static const char *getRegisterName(unsigned RegNo);
|
|
|
|
|
2014-04-29 07:57:24 +00:00
|
|
|
void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot) override;
|
2012-12-11 21:25:42 +00:00
|
|
|
|
|
|
|
private:
|
2014-04-15 22:32:49 +00:00
|
|
|
void printU8ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
void printU16ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
void printU32ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
2014-08-05 14:48:12 +00:00
|
|
|
void printOffen(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
void printIdxen(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
void printAddr64(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
void printMBUFOffset(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
void printGLC(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
void printSLC(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
void printTFE(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
2014-04-15 22:32:42 +00:00
|
|
|
void printRegOperand(unsigned RegNo, raw_ostream &O);
|
2014-04-15 22:32:49 +00:00
|
|
|
void printImmediate(uint32_t Imm, raw_ostream &O);
|
2014-04-15 22:32:42 +00:00
|
|
|
void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
2014-05-10 19:18:33 +00:00
|
|
|
void printOperandAndMods(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
2014-03-17 22:23:09 +00:00
|
|
|
static void printInterpSlot(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
2014-04-15 22:32:42 +00:00
|
|
|
void printMemOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
2014-03-17 22:23:09 +00:00
|
|
|
static void printIfSet(const MCInst *MI, unsigned OpNo, raw_ostream &O,
|
|
|
|
StringRef Asm, StringRef Default = "");
|
|
|
|
static void printAbs(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
static void printClamp(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
static void printLiteral(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
static void printLast(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
static void printNeg(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
static void printOMOD(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
static void printRel(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
static void printUpdateExecMask(const MCInst *MI, unsigned OpNo,
|
|
|
|
raw_ostream &O);
|
|
|
|
static void printUpdatePred(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
static void printWrite(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
static void printSel(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
static void printBankSwizzle(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
static void printRSel(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
static void printCT(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
static void printKCache(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
static void printSendMsg(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
static void printWaitFlag(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
2012-12-11 21:25:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End namespace llvm
|
|
|
|
|
2014-08-13 16:26:38 +00:00
|
|
|
#endif
|