2012-12-12 05:25:42 +08: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
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef AMDGPUINSTPRINTER_H
|
|
|
|
#define AMDGPUINSTPRINTER_H
|
|
|
|
|
|
|
|
#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);
|
|
|
|
|
|
|
|
virtual void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot);
|
|
|
|
|
|
|
|
private:
|
2013-11-12 10:35:51 +08:00
|
|
|
void printRegOperand(unsigned RegNo, raw_ostream &O);
|
2012-12-12 05:25:42 +08:00
|
|
|
void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
2013-02-15 03:03:25 +08:00
|
|
|
void printInterpSlot(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
2012-12-12 05:25:42 +08:00
|
|
|
void printMemOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
2013-05-03 05:52:30 +08:00
|
|
|
void printIfSet(const MCInst *MI, unsigned OpNo, raw_ostream &O,
|
|
|
|
StringRef Asm, StringRef Default = "");
|
2012-12-12 05:25:42 +08:00
|
|
|
void printAbs(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
void printClamp(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
void printLiteral(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
void printLast(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
void printNeg(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
void printOMOD(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
void printRel(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
void printUpdateExecMask(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
void printUpdatePred(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
void printWrite(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
2013-01-23 10:09:06 +08:00
|
|
|
void printSel(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
2013-05-03 05:52:30 +08:00
|
|
|
void printBankSwizzle(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
2013-05-18 00:50:20 +08:00
|
|
|
void printRSel(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
|
|
|
void printCT(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
2013-05-03 05:52:40 +08:00
|
|
|
void printKCache(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
2014-01-27 15:20:44 +08:00
|
|
|
void printSendMsg(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
2013-10-14 01:56:28 +08:00
|
|
|
void printWaitFlag(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
2012-12-12 05:25:42 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End namespace llvm
|
|
|
|
|
|
|
|
#endif // AMDGPUINSTRPRINTER_H
|