Path: blob/main/contrib/llvm-project/llvm/lib/Target/Xtensa/MCTargetDesc/XtensaInstPrinter.h
35295 views
//===- XtensaInstPrinter.h - Convert Xtensa MCInst to asm syntax -*- C++ -*-==//1//2// The LLVM Compiler Infrastructure3//4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.5// See https://llvm.org/LICENSE.txt for license information.6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception7//8//===----------------------------------------------------------------------===//9//10// This class prints an Xtensa MCInst to a .s file.11//12//===----------------------------------------------------------------------===//1314#ifndef LLVM_LIB_TARGET_XTENSA_MCTARGETDESC_XTENSAINSTPRINTER_H15#define LLVM_LIB_TARGET_XTENSA_MCTARGETDESC_XTENSAINSTPRINTER_H1617#include "llvm/MC/MCInstPrinter.h"18#include "llvm/Support/Compiler.h"1920namespace llvm {21class MCOperand;2223class XtensaInstPrinter : public MCInstPrinter {24public:25XtensaInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,26const MCRegisterInfo &MRI)27: MCInstPrinter(MAI, MII, MRI) {}2829// Automatically generated by tblgen.30std::pair<const char *, uint64_t> getMnemonic(const MCInst *MI) override;31void printInstruction(const MCInst *MI, uint64_t Address, raw_ostream &O);32static const char *getRegisterName(MCRegister Reg);3334// Print the given operand.35static void printOperand(const MCOperand &MO, raw_ostream &O);3637// Override MCInstPrinter.38void printRegName(raw_ostream &O, MCRegister Reg) const override;39void printInst(const MCInst *MI, uint64_t Address, StringRef Annot,40const MCSubtargetInfo &STI, raw_ostream &O) override;4142private:43// Print various types of operand.44void printOperand(const MCInst *MI, int OpNum, raw_ostream &O);45void printMemOperand(const MCInst *MI, int OpNUm, raw_ostream &O);46void printBranchTarget(const MCInst *MI, int OpNum, raw_ostream &O);47void printJumpTarget(const MCInst *MI, int OpNum, raw_ostream &O);48void printCallOperand(const MCInst *MI, int OpNum, raw_ostream &O);49void printL32RTarget(const MCInst *MI, int OpNum, raw_ostream &O);5051void printImm8_AsmOperand(const MCInst *MI, int OpNum, raw_ostream &O);52void printImm8_sh8_AsmOperand(const MCInst *MI, int OpNum, raw_ostream &O);53void printImm12_AsmOperand(const MCInst *MI, int OpNum, raw_ostream &O);54void printImm12m_AsmOperand(const MCInst *MI, int OpNum, raw_ostream &O);55void printUimm4_AsmOperand(const MCInst *MI, int OpNum, raw_ostream &O);56void printUimm5_AsmOperand(const MCInst *MI, int OpNum, raw_ostream &O);57void printShimm1_31_AsmOperand(const MCInst *MI, int OpNum, raw_ostream &O);58void printImm1_16_AsmOperand(const MCInst *MI, int OpNum, raw_ostream &O);59void printOffset8m8_AsmOperand(const MCInst *MI, int OpNum, raw_ostream &O);60void printOffset8m16_AsmOperand(const MCInst *MI, int OpNum, raw_ostream &O);61void printOffset8m32_AsmOperand(const MCInst *MI, int OpNum, raw_ostream &O);62void printOffset4m32_AsmOperand(const MCInst *MI, int OpNum, raw_ostream &O);63void printB4const_AsmOperand(const MCInst *MI, int OpNum, raw_ostream &O);64void printB4constu_AsmOperand(const MCInst *MI, int OpNum, raw_ostream &O);65};66} // end namespace llvm6768#endif /* LLVM_LIB_TARGET_XTENSA_MCTARGETDESC_XTENSAINSTPRINTER_H */697071