Path: blob/main/contrib/llvm-project/llvm/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.h
35294 views
//===- AVRInstPrinter.h - Convert AVR 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 an AVR MCInst to a .s file.9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_AVR_INST_PRINTER_H13#define LLVM_AVR_INST_PRINTER_H1415#include "llvm/MC/MCInstPrinter.h"1617#include "MCTargetDesc/AVRMCTargetDesc.h"1819namespace llvm {2021/// Prints AVR instructions to a textual stream.22class AVRInstPrinter : public MCInstPrinter {23public:24AVRInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,25const MCRegisterInfo &MRI)26: MCInstPrinter(MAI, MII, MRI) {}2728static const char *getPrettyRegisterName(unsigned RegNo,29MCRegisterInfo const &MRI);3031void printInst(const MCInst *MI, uint64_t Address, StringRef Annot,32const MCSubtargetInfo &STI, raw_ostream &O) override;3334private:35static const char *getRegisterName(MCRegister Reg,36unsigned AltIdx = AVR::NoRegAltName);3738void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);39void printPCRelImm(const MCInst *MI, unsigned OpNo, raw_ostream &O);40void printPCRelImm(const MCInst *MI, uint64_t /*Address*/, unsigned OpNo,41raw_ostream &O) {42printPCRelImm(MI, OpNo, O);43}44void printMemri(const MCInst *MI, unsigned OpNo, raw_ostream &O);45void printMemspi(const MCInst *MI, unsigned OpNo, raw_ostream &O) {46printMemri(MI, OpNo, O);47}4849// Autogenerated by TableGen.50std::pair<const char *, uint64_t> getMnemonic(const MCInst *MI) override;51void printInstruction(const MCInst *MI, uint64_t Address, raw_ostream &O);52bool printAliasInstr(const MCInst *MI, uint64_t Address, raw_ostream &O);53void printCustomAliasOperand(const MCInst *MI, uint64_t Address,54unsigned OpIdx, unsigned PrintMethodIdx,55raw_ostream &O);56};5758} // end namespace llvm5960#endif // LLVM_AVR_INST_PRINTER_H616263