Path: blob/main/contrib/llvm-project/llvm/lib/Target/Sparc/MCTargetDesc/SparcInstPrinter.h
35294 views
//===-- SparcInstPrinter.h - Convert Sparc MCInst to assembly syntax ------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This class prints an Sparc MCInst to a .s file.9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_LIB_TARGET_SPARC_MCTARGETDESC_SPARCINSTPRINTER_H13#define LLVM_LIB_TARGET_SPARC_MCTARGETDESC_SPARCINSTPRINTER_H1415#include "SparcMCTargetDesc.h"16#include "llvm/MC/MCInstPrinter.h"1718namespace llvm {1920class SparcInstPrinter : public MCInstPrinter {21public:22SparcInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,23const MCRegisterInfo &MRI)24: MCInstPrinter(MAI, MII, MRI) {}2526void printRegName(raw_ostream &OS, MCRegister Reg) const override;27void printRegName(raw_ostream &OS, MCRegister Reg, unsigned AltIdx) const;28void printInst(const MCInst *MI, uint64_t Address, StringRef Annot,29const MCSubtargetInfo &STI, raw_ostream &O) override;30bool printSparcAliasInstr(const MCInst *MI, const MCSubtargetInfo &STI,31raw_ostream &OS);32bool isV9(const MCSubtargetInfo &STI) const;3334// Autogenerated by tblgen.35std::pair<const char *, uint64_t> getMnemonic(const MCInst *MI) override;36void printInstruction(const MCInst *MI, uint64_t Address,37const MCSubtargetInfo &STI, raw_ostream &O);38bool printAliasInstr(const MCInst *MI, uint64_t Address,39const MCSubtargetInfo &STI, raw_ostream &O);40void printCustomAliasOperand(const MCInst *MI, uint64_t Address,41unsigned OpIdx, unsigned PrintMethodIdx,42const MCSubtargetInfo &STI, raw_ostream &O);43static const char *getRegisterName(MCRegister Reg,44unsigned AltIdx = SP::NoRegAltName);4546void printOperand(const MCInst *MI, int opNum, const MCSubtargetInfo &STI,47raw_ostream &OS);48void printMemOperand(const MCInst *MI, int opNum, const MCSubtargetInfo &STI,49raw_ostream &OS);50void printCCOperand(const MCInst *MI, int opNum, const MCSubtargetInfo &STI,51raw_ostream &OS);52bool printGetPCX(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI,53raw_ostream &OS);54void printMembarTag(const MCInst *MI, int opNum, const MCSubtargetInfo &STI,55raw_ostream &O);56void printASITag(const MCInst *MI, int opNum, const MCSubtargetInfo &STI,57raw_ostream &O);58void printPrefetchTag(const MCInst *MI, int opNum, const MCSubtargetInfo &STI,59raw_ostream &O);60};61} // end namespace llvm6263#endif646566