Path: blob/main/contrib/llvm-project/llvm/lib/Target/MSP430/MCTargetDesc/MSP430InstPrinter.h
35294 views
//= MSP430InstPrinter.h - Convert MSP430 MCInst to assembly 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 MSP430 MCInst to a .s file.9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_LIB_TARGET_MSP430_MCTARGETDESC_MSP430INSTPRINTER_H13#define LLVM_LIB_TARGET_MSP430_MCTARGETDESC_MSP430INSTPRINTER_H1415#include "llvm/MC/MCInstPrinter.h"1617namespace llvm {18class MSP430InstPrinter : public MCInstPrinter {19public:20MSP430InstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,21const MCRegisterInfo &MRI)22: MCInstPrinter(MAI, MII, MRI) {}2324void printRegName(raw_ostream &O, MCRegister Reg) const override;2526void printInst(const MCInst *MI, uint64_t Address, StringRef Annot,27const MCSubtargetInfo &STI, raw_ostream &O) override;2829// Autogenerated by tblgen.30std::pair<const char *, uint64_t> getMnemonic(const MCInst *MI) override;31void printInstruction(const MCInst *MI, uint64_t Address, raw_ostream &O);32bool printAliasInstr(const MCInst *MI, uint64_t Address, raw_ostream &O);33void printCustomAliasOperand(const MCInst *MI, uint64_t Address,34unsigned OpIdx, unsigned PrintMethodIdx,35raw_ostream &O);36static const char *getRegisterName(MCRegister Reg);3738private:39void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O,40const char *Modifier = nullptr);41void printPCRelImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);42void printSrcMemOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O,43const char *Modifier = nullptr);44void printIndRegOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);45void printPostIndRegOperand(const MCInst *MI, unsigned OpNo,46raw_ostream &O);47void printCCOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);4849};50}5152#endif535455