9#ifndef LLVM_MC_MCINSTPRINTER_H
10#define LLVM_MC_MCINSTPRINTER_H
31void dumpBytes(ArrayRef<uint8_t> Bytes, raw_ostream &
OS);
42struct AliasMatchingData;
105 bool EnableMarkup,
bool EnableColor);
134 virtual std::pair<const char *, uint64_t>
227 unsigned PredicateIndex);
#define LLVM_CTOR_NODISCARD
This file defines the SmallVector class.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
This class is intended to be used as a base class for asm properties and features specific to the tar...
WithMarkup & operator<<(const T &O)
WithMarkup & operator<<(T &O)
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
WithMarkup markup(raw_ostream &OS, Markup M)
void setPrintBranchImmAsAddress(bool Value)
bool UseMarkup
True if we are printing marked up assembly.
void setMCInstrAnalysis(const MCInstrAnalysis *Value)
format_object< int64_t > formatHex(int64_t Value) const
bool PrintImmHex
True if we are printing immediates as hex.
void setCommentStream(raw_ostream &OS)
Specify a stream to emit comments to.
virtual bool applyTargetSpecificCLOption(StringRef Opt)
Customize the printer according to a command line option.
void setUseColor(bool Value)
raw_ostream * CommentStream
A stream that comments can be emitted to if desired.
bool getPrintImmHex() const
void setSymbolizeOperands(bool Value)
bool SymbolizeOperands
If true, symbolize branch target and memory reference operands.
void setPrintImmHex(bool Value)
StringRef getOpcodeName(unsigned Opcode) const
Return the name of the specified opcode enum (e.g.
SmallVector< raw_ostream::Colors, 4 > ColorStack
void setUseMarkup(bool Value)
format_object< int64_t > formatDec(int64_t Value) const
Utility functions to print decimal/hexadecimal values.
const MCRegisterInfo & MRI
void printAnnotation(raw_ostream &OS, StringRef Annot)
Utility function for printing annotations.
format_object< int64_t > formatImm(int64_t Value) const
Utility function to print immediates in decimal or hex.
bool UseColor
True if we are printing colored assembly.
bool getUseMarkup() const
virtual void printInst(const MCInst *MI, uint64_t Address, StringRef Annot, const MCSubtargetInfo &STI, raw_ostream &OS)=0
Print the specified MCInst to the specified raw_ostream.
bool PrintBranchImmAsAddress
If true, a branch immediate (e.g.
virtual void printRegName(raw_ostream &OS, MCRegister Reg)
Print the assembler register name.
virtual std::pair< const char *, uint64_t > getMnemonic(const MCInst &MI) const =0
Returns a pair containing the mnemonic for MI and the number of bits left for further processing by p...
void setPrintHexStyle(HexStyle::Style Value)
const char * matchAliasPatterns(const MCInst *MI, const MCSubtargetInfo *STI, const AliasMatchingData &M)
Helper for matching MCInsts to alias patterns when printing instructions.
const MCInstrAnalysis * MIA
MCInstPrinter(const MCAsmInfo &mai, const MCInstrInfo &mii, const MCRegisterInfo &mri)
HexStyle::Style PrintHexStyle
Which style to use for printing hexadecimal values.
bool PrintAliases
True if we prefer aliases (e.g. nop) to raw mnemonics.
Instances of this class represent a single low-level machine instruction.
Interface to description of machine instruction set.
Instances of this class represent operands of the MCInst class.
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
Wrapper class representing physical registers. Should be passed by value.
Generic base class for all target subtargets.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
LLVM Value Representation.
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
void dumpBytes(ArrayRef< uint8_t > Bytes, raw_ostream &OS)
Convert ‘Bytes’ to a hex string and output to ‘OS’.
Tablegenerated data structures needed to match alias patterns.
ArrayRef< AliasPatternCond > PatternConds
bool(* ValidateMCOperand)(const MCOperand &MCOp, const MCSubtargetInfo &STI, unsigned PredicateIndex)
ArrayRef< PatternsForOpcode > OpToPatterns
ArrayRef< AliasPattern > Patterns
Data for each alias pattern.
Map from opcode to pattern list by binary search.