Path: blob/main/contrib/llvm-project/llvm/lib/Target/CSKY/MCTargetDesc/CSKYInstPrinter.h
35294 views
//===-- CSKYInstPrinter.h - Convert CSKY MCInst to asm syntax ---*- C++ -*----//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 CSKY MCInst to a .s file.9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_LIB_TARGET_CSKY_MCTARGETDESC_CSKYINSTPRINTER_H13#define LLVM_LIB_TARGET_CSKY_MCTARGETDESC_CSKYINSTPRINTER_H1415#include "MCTargetDesc/CSKYMCTargetDesc.h"16#include "llvm/MC/MCInstPrinter.h"1718namespace llvm {1920class CSKYInstPrinter : public MCInstPrinter {21private:22bool ABIRegNames = false;2324public:25CSKYInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,26const MCRegisterInfo &MRI)27: MCInstPrinter(MAI, MII, MRI) {}2829bool applyTargetSpecificCLOption(StringRef Opt) override;3031void printInst(const MCInst *MI, uint64_t Address, StringRef Annot,32const MCSubtargetInfo &STI, raw_ostream &O) override;33void printRegName(raw_ostream &O, MCRegister Reg) const override;3435void printOperand(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI,36raw_ostream &O, const char *Modifier = nullptr);3738void printFPRRegName(raw_ostream &O, unsigned RegNo) const;3940// Autogenerated by tblgen.41std::pair<const char *, uint64_t> getMnemonic(const MCInst *MI) override;42void printInstruction(const MCInst *MI, uint64_t Address,43const MCSubtargetInfo &STI, raw_ostream &O);44bool printAliasInstr(const MCInst *MI, uint64_t Address,45const MCSubtargetInfo &STI, raw_ostream &O);46void printCustomAliasOperand(const MCInst *MI, uint64_t Address,47unsigned OpIdx, unsigned PrintMethodIdx,48const MCSubtargetInfo &STI, raw_ostream &O);4950void printDataSymbol(const MCInst *MI, unsigned OpNo,51const MCSubtargetInfo &STI, raw_ostream &O);52void printConstpool(const MCInst *MI, uint64_t Address, unsigned OpNo,53const MCSubtargetInfo &STI, raw_ostream &O);54void printPSRFlag(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI,55raw_ostream &O);56void printRegisterSeq(const MCInst *MI, unsigned OpNo,57const MCSubtargetInfo &STI, raw_ostream &O);58void printRegisterList(const MCInst *MI, unsigned OpNo,59const MCSubtargetInfo &STI, raw_ostream &O);60void printCSKYSymbolOperand(const MCInst *MI, uint64_t Address, unsigned OpNo,61const MCSubtargetInfo &STI, raw_ostream &O);62void printSPAddr(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI,63raw_ostream &O);64void printFPR(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI,65raw_ostream &O);66static const char *getRegisterName(MCRegister Reg);67static const char *getRegisterName(MCRegister Reg, unsigned AltIdx);68};6970} // namespace llvm7172#endif // LLVM_LIB_TARGET_CSKY_MCTARGETDESC_CSKYINSTPRINTER_H737475