1*5ffd83dbSDimitry Andric //===-- VEInstPrinter.h - Convert VE MCInst to assembly syntax ------------===// 2*5ffd83dbSDimitry Andric // 3*5ffd83dbSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*5ffd83dbSDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 5*5ffd83dbSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*5ffd83dbSDimitry Andric // 7*5ffd83dbSDimitry Andric //===----------------------------------------------------------------------===// 8*5ffd83dbSDimitry Andric // 9*5ffd83dbSDimitry Andric // This class prints an VE MCInst to a .s file. 10*5ffd83dbSDimitry Andric // 11*5ffd83dbSDimitry Andric //===----------------------------------------------------------------------===// 12*5ffd83dbSDimitry Andric 13*5ffd83dbSDimitry Andric #ifndef LLVM_LIB_TARGET_VE_INSTPRINTER_VEINSTPRINTER_H 14*5ffd83dbSDimitry Andric #define LLVM_LIB_TARGET_VE_INSTPRINTER_VEINSTPRINTER_H 15*5ffd83dbSDimitry Andric 16*5ffd83dbSDimitry Andric #include "VEMCTargetDesc.h" 17*5ffd83dbSDimitry Andric #include "llvm/MC/MCInstPrinter.h" 18*5ffd83dbSDimitry Andric 19*5ffd83dbSDimitry Andric namespace llvm { 20*5ffd83dbSDimitry Andric 21*5ffd83dbSDimitry Andric class VEInstPrinter : public MCInstPrinter { 22*5ffd83dbSDimitry Andric public: 23*5ffd83dbSDimitry Andric VEInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII, 24*5ffd83dbSDimitry Andric const MCRegisterInfo &MRI) 25*5ffd83dbSDimitry Andric : MCInstPrinter(MAI, MII, MRI) {} 26*5ffd83dbSDimitry Andric 27*5ffd83dbSDimitry Andric void printRegName(raw_ostream &OS, unsigned RegNo) const override; 28*5ffd83dbSDimitry Andric void printInst(const MCInst *MI, uint64_t Address, StringRef Annot, 29*5ffd83dbSDimitry Andric const MCSubtargetInfo &STI, raw_ostream &OS) override; 30*5ffd83dbSDimitry Andric 31*5ffd83dbSDimitry Andric // Autogenerated by tblgen. 32*5ffd83dbSDimitry Andric bool printAliasInstr(const MCInst *, uint64_t Address, 33*5ffd83dbSDimitry Andric const MCSubtargetInfo &, raw_ostream &); 34*5ffd83dbSDimitry Andric void printInstruction(const MCInst *, uint64_t, const MCSubtargetInfo &, 35*5ffd83dbSDimitry Andric raw_ostream &); 36*5ffd83dbSDimitry Andric static const char *getRegisterName(unsigned RegNo, 37*5ffd83dbSDimitry Andric unsigned AltIdx = VE::NoRegAltName); 38*5ffd83dbSDimitry Andric 39*5ffd83dbSDimitry Andric void printOperand(const MCInst *MI, int OpNum, const MCSubtargetInfo &STI, 40*5ffd83dbSDimitry Andric raw_ostream &OS); 41*5ffd83dbSDimitry Andric void printMemASXOperand(const MCInst *MI, int OpNum, 42*5ffd83dbSDimitry Andric const MCSubtargetInfo &STI, raw_ostream &OS, 43*5ffd83dbSDimitry Andric const char *Modifier = nullptr); 44*5ffd83dbSDimitry Andric void printMemASOperandASX(const MCInst *MI, int OpNum, 45*5ffd83dbSDimitry Andric const MCSubtargetInfo &STI, raw_ostream &OS, 46*5ffd83dbSDimitry Andric const char *Modifier = nullptr); 47*5ffd83dbSDimitry Andric void printMemASOperandRRM(const MCInst *MI, int OpNum, 48*5ffd83dbSDimitry Andric const MCSubtargetInfo &STI, raw_ostream &OS, 49*5ffd83dbSDimitry Andric const char *Modifier = nullptr); 50*5ffd83dbSDimitry Andric void printMemASOperandHM(const MCInst *MI, int OpNum, 51*5ffd83dbSDimitry Andric const MCSubtargetInfo &STI, raw_ostream &OS, 52*5ffd83dbSDimitry Andric const char *Modifier = nullptr); 53*5ffd83dbSDimitry Andric void printMImmOperand(const MCInst *MI, int OpNum, const MCSubtargetInfo &STI, 54*5ffd83dbSDimitry Andric raw_ostream &OS); 55*5ffd83dbSDimitry Andric void printCCOperand(const MCInst *MI, int OpNum, const MCSubtargetInfo &STI, 56*5ffd83dbSDimitry Andric raw_ostream &OS); 57*5ffd83dbSDimitry Andric void printRDOperand(const MCInst *MI, int OpNum, const MCSubtargetInfo &STI, 58*5ffd83dbSDimitry Andric raw_ostream &OS); 59*5ffd83dbSDimitry Andric }; 60*5ffd83dbSDimitry Andric } // namespace llvm 61*5ffd83dbSDimitry Andric 62*5ffd83dbSDimitry Andric #endif 63