Path: blob/main/contrib/llvm-project/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchInstPrinter.h
35294 views
//===-- LoongArchInstPrinter.h - Convert LoongArch MCInst to asm 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 a LoongArch MCInst to a .s file.9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_LIB_TARGET_LOONGARCH_MCTARGETDESC_LOONGARCHINSTPRINTER_H13#define LLVM_LIB_TARGET_LOONGARCH_MCTARGETDESC_LOONGARCHINSTPRINTER_H1415#include "MCTargetDesc/LoongArchMCTargetDesc.h"16#include "llvm/MC/MCInstPrinter.h"1718namespace llvm {1920class LoongArchInstPrinter : public MCInstPrinter {21public:22LoongArchInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,23const MCRegisterInfo &MRI)24: MCInstPrinter(MAI, MII, MRI) {}2526bool applyTargetSpecificCLOption(StringRef Opt) override;2728void printInst(const MCInst *MI, uint64_t Address, StringRef Annot,29const MCSubtargetInfo &STI, raw_ostream &O) override;30void printRegName(raw_ostream &O, MCRegister Reg) const override;31void printAtomicMemOp(const MCInst *MI, unsigned OpNo,32const MCSubtargetInfo &STI, raw_ostream &O);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);44static const char *getRegisterName(MCRegister Reg, unsigned AltIdx);4546private:47void printOperand(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI,48raw_ostream &O);49};50} // end namespace llvm5152#endif // LLVM_LIB_TARGET_LOONGARCH_MCTARGETDESC_LOONGARCHINSTPRINTER_H535455