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