15ffd83dbSDimitry Andric //===-- VEInstPrinter.h - Convert VE MCInst to assembly syntax ------------===// 25ffd83dbSDimitry Andric // 35ffd83dbSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 45ffd83dbSDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 55ffd83dbSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 65ffd83dbSDimitry Andric // 75ffd83dbSDimitry Andric //===----------------------------------------------------------------------===// 85ffd83dbSDimitry Andric // 95ffd83dbSDimitry Andric // This class prints an VE MCInst to a .s file. 105ffd83dbSDimitry Andric // 115ffd83dbSDimitry Andric //===----------------------------------------------------------------------===// 125ffd83dbSDimitry Andric 135ffd83dbSDimitry Andric #ifndef LLVM_LIB_TARGET_VE_INSTPRINTER_VEINSTPRINTER_H 145ffd83dbSDimitry Andric #define LLVM_LIB_TARGET_VE_INSTPRINTER_VEINSTPRINTER_H 155ffd83dbSDimitry Andric 165ffd83dbSDimitry Andric #include "VEMCTargetDesc.h" 175ffd83dbSDimitry Andric #include "llvm/MC/MCInstPrinter.h" 185ffd83dbSDimitry Andric 195ffd83dbSDimitry Andric namespace llvm { 205ffd83dbSDimitry Andric 215ffd83dbSDimitry Andric class VEInstPrinter : public MCInstPrinter { 225ffd83dbSDimitry Andric public: VEInstPrinter(const MCAsmInfo & MAI,const MCInstrInfo & MII,const MCRegisterInfo & MRI)235ffd83dbSDimitry Andric VEInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII, 245ffd83dbSDimitry Andric const MCRegisterInfo &MRI) 255ffd83dbSDimitry Andric : MCInstPrinter(MAI, MII, MRI) {} 265ffd83dbSDimitry Andric 27*bdd1243dSDimitry Andric void printRegName(raw_ostream &OS, MCRegister Reg) const override; 285ffd83dbSDimitry Andric void printInst(const MCInst *MI, uint64_t Address, StringRef Annot, 295ffd83dbSDimitry Andric const MCSubtargetInfo &STI, raw_ostream &OS) override; 305ffd83dbSDimitry Andric 315ffd83dbSDimitry Andric // Autogenerated by tblgen. 32e8d8bef9SDimitry Andric std::pair<const char *, uint64_t> getMnemonic(const MCInst *MI) override; 335ffd83dbSDimitry Andric bool printAliasInstr(const MCInst *, uint64_t Address, 345ffd83dbSDimitry Andric const MCSubtargetInfo &, raw_ostream &); 355ffd83dbSDimitry Andric void printInstruction(const MCInst *, uint64_t, const MCSubtargetInfo &, 365ffd83dbSDimitry Andric raw_ostream &); 37*bdd1243dSDimitry Andric static const char *getRegisterName(MCRegister Reg, 385ffd83dbSDimitry Andric unsigned AltIdx = VE::NoRegAltName); 395ffd83dbSDimitry Andric 405ffd83dbSDimitry Andric void printOperand(const MCInst *MI, int OpNum, const MCSubtargetInfo &STI, 415ffd83dbSDimitry Andric raw_ostream &OS); 425ffd83dbSDimitry Andric void printMemASXOperand(const MCInst *MI, int OpNum, 435ffd83dbSDimitry Andric const MCSubtargetInfo &STI, raw_ostream &OS, 445ffd83dbSDimitry Andric const char *Modifier = nullptr); 455ffd83dbSDimitry Andric void printMemASOperandASX(const MCInst *MI, int OpNum, 465ffd83dbSDimitry Andric const MCSubtargetInfo &STI, raw_ostream &OS, 475ffd83dbSDimitry Andric const char *Modifier = nullptr); 485ffd83dbSDimitry Andric void printMemASOperandRRM(const MCInst *MI, int OpNum, 495ffd83dbSDimitry Andric const MCSubtargetInfo &STI, raw_ostream &OS, 505ffd83dbSDimitry Andric const char *Modifier = nullptr); 515ffd83dbSDimitry Andric void printMemASOperandHM(const MCInst *MI, int OpNum, 525ffd83dbSDimitry Andric const MCSubtargetInfo &STI, raw_ostream &OS, 535ffd83dbSDimitry Andric const char *Modifier = nullptr); 545ffd83dbSDimitry Andric void printMImmOperand(const MCInst *MI, int OpNum, const MCSubtargetInfo &STI, 555ffd83dbSDimitry Andric raw_ostream &OS); 565ffd83dbSDimitry Andric void printCCOperand(const MCInst *MI, int OpNum, const MCSubtargetInfo &STI, 575ffd83dbSDimitry Andric raw_ostream &OS); 585ffd83dbSDimitry Andric void printRDOperand(const MCInst *MI, int OpNum, const MCSubtargetInfo &STI, 595ffd83dbSDimitry Andric raw_ostream &OS); 605ffd83dbSDimitry Andric }; 615ffd83dbSDimitry Andric } // namespace llvm 625ffd83dbSDimitry Andric 635ffd83dbSDimitry Andric #endif 64