LLVM: include/llvm/MC/MCInstPrinter.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9#ifndef LLVM_MC_MCINSTPRINTER_H
10#define LLVM_MC_MCINSTPRINTER_H
11
16#include
17
18namespace llvm {
19
29
30
32
41
42struct AliasMatchingData;
43
44
45
47protected:
48
49
50
56
57
59
60
62
63
65
66
68
69
71
72
73
74
76
77
79
81
82
84
85
88
89public:
92
94
101
103 public:
105 Markup M, bool EnableMarkup,
106 bool EnableColor);
108
110 OS << O;
111 return *this;
112 }
113
115 OS << O;
116 return *this;
117 }
118
119 private:
122 bool EnableMarkup;
123 bool EnableColor;
124 };
125
126
127
129
130
132
133
134
135 virtual std::pair<const char *, uint64_t>
137
138
139
140
141
142
143
144
147
148
149
151
152
154
157
160
161 WithMarkup markup(raw_ostream &OS, Markup M);
162
165
167
171
174
175
179
180
184};
185
186
192
193
194
201
220
221
228 unsigned PredicateIndex);
229};
230
231}
232
233#endif
#define LLVM_CTOR_NODISCARD
static StringRef getOpcodeName(uint8_t Opcode, uint8_t OpcodeBase)
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)
Definition MCInstPrinter.h:114
WithMarkup & operator<<(T &O)
Definition MCInstPrinter.h:109
LLVM_CTOR_NODISCARD LLVM_ABI WithMarkup(MCInstPrinter &IP, raw_ostream &OS, Markup M, bool EnableMarkup, bool EnableColor)
void setPrintBranchImmAsAddress(bool Value)
Definition MCInstPrinter.h:168
bool UseMarkup
True if we are printing marked up assembly.
Definition MCInstPrinter.h:58
void setMCInstrAnalysis(const MCInstrAnalysis *Value)
Definition MCInstPrinter.h:173
format_object< int64_t > formatHex(int64_t Value) const
bool PrintImmHex
True if we are printing immediates as hex.
Definition MCInstPrinter.h:67
bool getUseColor() const
Definition MCInstPrinter.h:158
void setCommentStream(raw_ostream &OS)
Specify a stream to emit comments to.
Definition MCInstPrinter.h:131
virtual bool applyTargetSpecificCLOption(StringRef Opt)
Customize the printer according to a command line option.
Definition MCInstPrinter.h:128
void setUseColor(bool Value)
Definition MCInstPrinter.h:159
const MCInstrInfo & MII
Definition MCInstPrinter.h:53
raw_ostream * CommentStream
A stream that comments can be emitted to if desired.
Definition MCInstPrinter.h:51
bool getPrintImmHex() const
Definition MCInstPrinter.h:163
void setSymbolizeOperands(bool Value)
Definition MCInstPrinter.h:172
Markup
Definition MCInstPrinter.h:95
@ Register
Definition MCInstPrinter.h:97
@ Immediate
Definition MCInstPrinter.h:96
@ Memory
Definition MCInstPrinter.h:99
@ Target
Definition MCInstPrinter.h:98
bool SymbolizeOperands
If true, symbolize branch target and memory reference operands.
Definition MCInstPrinter.h:78
void setPrintImmHex(bool Value)
Definition MCInstPrinter.h:164
SmallVector< raw_ostream::Colors, 4 > ColorStack
Definition MCInstPrinter.h:80
void setUseMarkup(bool Value)
Definition MCInstPrinter.h:156
format_object< int64_t > formatDec(int64_t Value) const
Utility functions to print decimal/hexadecimal values.
const MCRegisterInfo & MRI
Definition MCInstPrinter.h:54
const MCAsmInfo & MAI
Definition MCInstPrinter.h:52
format_object< int64_t > formatImm(int64_t Value) const
Utility function to print immediates in decimal or hex.
Definition MCInstPrinter.h:176
bool UseColor
True if we are printing colored assembly.
Definition MCInstPrinter.h:61
bool getUseMarkup() const
Definition MCInstPrinter.h:155
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.
Definition MCInstPrinter.h:75
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)
Definition MCInstPrinter.h:166
const MCInstrAnalysis * MIA
Definition MCInstPrinter.h:55
MCInstPrinter(const MCAsmInfo &mai, const MCInstrInfo &mii, const MCRegisterInfo &mri)
Definition MCInstPrinter.h:90
HexStyle::Style PrintHexStyle
Which style to use for printing hexadecimal values.
Definition MCInstPrinter.h:70
bool PrintAliases
True if we prefer aliases (e.g. nop) to raw mnemonics.
Definition MCInstPrinter.h:64
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.
Definition MCInstPrinter.h:33
Style
Definition MCInstPrinter.h:35
@ C
0xff
Definition MCInstPrinter.h:36
@ Asm
0ffh
Definition MCInstPrinter.h:37
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI 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.
Definition MCInstPrinter.h:222
ArrayRef< AliasPatternCond > PatternConds
Definition MCInstPrinter.h:225
bool(* ValidateMCOperand)(const MCOperand &MCOp, const MCSubtargetInfo &STI, unsigned PredicateIndex)
Definition MCInstPrinter.h:227
StringRef AsmStrings
Definition MCInstPrinter.h:226
ArrayRef< PatternsForOpcode > OpToPatterns
Definition MCInstPrinter.h:223
ArrayRef< AliasPattern > Patterns
Definition MCInstPrinter.h:224
Definition MCInstPrinter.h:202
uint32_t Value
Definition MCInstPrinter.h:218
CondKind Kind
Definition MCInstPrinter.h:217
CondKind
Definition MCInstPrinter.h:203
@ K_TiedReg
Definition MCInstPrinter.h:211
@ K_NegFeature
Definition MCInstPrinter.h:205
@ K_EndOrFeatures
Definition MCInstPrinter.h:208
@ K_RegClass
Definition MCInstPrinter.h:213
@ K_OrNegFeature
Definition MCInstPrinter.h:207
@ K_Reg
Definition MCInstPrinter.h:210
@ K_Imm
Definition MCInstPrinter.h:212
@ K_OrFeature
Definition MCInstPrinter.h:206
@ K_Custom
Definition MCInstPrinter.h:214
@ K_Ignore
Definition MCInstPrinter.h:209
@ K_Feature
Definition MCInstPrinter.h:204
Data for each alias pattern.
Definition MCInstPrinter.h:195
uint8_t NumConds
Definition MCInstPrinter.h:199
uint32_t AsmStrOffset
Definition MCInstPrinter.h:196
uint32_t AliasCondStart
Definition MCInstPrinter.h:197
uint8_t NumOperands
Definition MCInstPrinter.h:198
Map from opcode to pattern list by binary search.
Definition MCInstPrinter.h:187
uint16_t PatternStart
Definition MCInstPrinter.h:189
uint16_t NumPatterns
Definition MCInstPrinter.h:190
uint32_t Opcode
Definition MCInstPrinter.h:188