xref: /freebsd-src/contrib/llvm-project/llvm/lib/Target/AMDGPU/MCTargetDesc/R600InstPrinter.h (revision 349cc55c9796c4596a5b9904cd3281af295f878f)
1*349cc55cSDimitry Andric //===-- R600InstPrinter.h - AMDGPU MC Inst -> ASM interface -----*- C++ -*-===//
2*349cc55cSDimitry Andric //
3*349cc55cSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*349cc55cSDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5*349cc55cSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*349cc55cSDimitry Andric //
7*349cc55cSDimitry Andric //===----------------------------------------------------------------------===//
8*349cc55cSDimitry Andric 
9*349cc55cSDimitry Andric #ifndef LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_R600INSTPRINTER_H
10*349cc55cSDimitry Andric #define LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_R600INSTPRINTER_H
11*349cc55cSDimitry Andric 
12*349cc55cSDimitry Andric #include "llvm/MC/MCInstPrinter.h"
13*349cc55cSDimitry Andric 
14*349cc55cSDimitry Andric namespace llvm {
15*349cc55cSDimitry Andric 
16*349cc55cSDimitry Andric class R600InstPrinter : public MCInstPrinter {
17*349cc55cSDimitry Andric public:
18*349cc55cSDimitry Andric   R600InstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,
19*349cc55cSDimitry Andric                   const MCRegisterInfo &MRI)
20*349cc55cSDimitry Andric       : MCInstPrinter(MAI, MII, MRI) {}
21*349cc55cSDimitry Andric 
22*349cc55cSDimitry Andric   void printInst(const MCInst *MI, uint64_t Address, StringRef Annot,
23*349cc55cSDimitry Andric                  const MCSubtargetInfo &STI, raw_ostream &O) override;
24*349cc55cSDimitry Andric   std::pair<const char *, uint64_t> getMnemonic(const MCInst *MI) override;
25*349cc55cSDimitry Andric   void printInstruction(const MCInst *MI, uint64_t Address, raw_ostream &O);
26*349cc55cSDimitry Andric   static const char *getRegisterName(unsigned RegNo);
27*349cc55cSDimitry Andric 
28*349cc55cSDimitry Andric   void printAbs(const MCInst *MI, unsigned OpNo, raw_ostream &O);
29*349cc55cSDimitry Andric   void printBankSwizzle(const MCInst *MI, unsigned OpNo, raw_ostream &O);
30*349cc55cSDimitry Andric   void printClamp(const MCInst *MI, unsigned OpNo, raw_ostream &O);
31*349cc55cSDimitry Andric   void printCT(const MCInst *MI, unsigned OpNo, raw_ostream &O);
32*349cc55cSDimitry Andric   void printKCache(const MCInst *MI, unsigned OpNo, raw_ostream &O);
33*349cc55cSDimitry Andric   void printLast(const MCInst *MI, unsigned OpNo, raw_ostream &O);
34*349cc55cSDimitry Andric   void printLiteral(const MCInst *MI, unsigned OpNo, raw_ostream &O);
35*349cc55cSDimitry Andric   void printMemOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
36*349cc55cSDimitry Andric   void printNeg(const MCInst *MI, unsigned OpNo, raw_ostream &O);
37*349cc55cSDimitry Andric   void printOMOD(const MCInst *MI, unsigned OpNo, raw_ostream &O);
38*349cc55cSDimitry Andric   void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
39*349cc55cSDimitry Andric   void printRel(const MCInst *MI, unsigned OpNo, raw_ostream &O);
40*349cc55cSDimitry Andric   void printRSel(const MCInst *MI, unsigned OpNo, raw_ostream &O);
41*349cc55cSDimitry Andric   void printUpdateExecMask(const MCInst *MI, unsigned OpNo, raw_ostream &O);
42*349cc55cSDimitry Andric   void printUpdatePred(const MCInst *MI, unsigned OpNo, raw_ostream &O);
43*349cc55cSDimitry Andric   void printWrite(const MCInst *MI, unsigned OpNo, raw_ostream &O);
44*349cc55cSDimitry Andric };
45*349cc55cSDimitry Andric 
46*349cc55cSDimitry Andric } // End namespace llvm
47*349cc55cSDimitry Andric 
48*349cc55cSDimitry Andric #endif
49