31 int64_t Imm =
MI->getOperand(
Op).getImm();
32 unsigned Opc =
MI->getOpcode();
33 bool IsCCMPOrCTEST = X86::isCCMPCC(Opc) || X86::isCTESTCC(Opc);
38 case 0: O <<
"o";
break;
39 case 1: O <<
"no";
break;
40 case 2: O <<
"b";
break;
41 case 3: O <<
"ae";
break;
42 case 4: O <<
"e";
break;
43 case 5: O <<
"ne";
break;
44 case 6: O <<
"be";
break;
45 case 7: O <<
"a";
break;
46 case 8: O <<
"s";
break;
47 case 9: O <<
"ns";
break;
48 case 0xa: O << (IsCCMPOrCTEST ?
"t" :
"p");
break;
49 case 0xb: O << (IsCCMPOrCTEST ?
"f" :
"np");
break;
50 case 0xc: O <<
"l";
break;
51 case 0xd: O <<
"ge";
break;
52 case 0xe: O <<
"le";
break;
53 case 0xf: O <<
"g";
break;
63 int64_t Imm =
MI->getOperand(
Op).getImm();
64 assert(Imm >= 0 && Imm < 16 &&
"Invalid condition flags");
76 O << SimplifiedFlags <<
"}";
81 int64_t Imm =
MI->getOperand(
Op).getImm();
84 case 0: O <<
"eq";
break;
85 case 1: O <<
"lt";
break;
86 case 2: O <<
"le";
break;
87 case 3: O <<
"unord";
break;
88 case 4: O <<
"neq";
break;
89 case 5: O <<
"nlt";
break;
90 case 6: O <<
"nle";
break;
91 case 7: O <<
"ord";
break;
92 case 8: O <<
"eq_uq";
break;
93 case 9: O <<
"nge";
break;
94 case 0xa: O <<
"ngt";
break;
95 case 0xb: O <<
"false";
break;
96 case 0xc: O <<
"neq_oq";
break;
97 case 0xd: O <<
"ge";
break;
98 case 0xe: O <<
"gt";
break;
99 case 0xf: O <<
"true";
break;
100 case 0x10: O <<
"eq_os";
break;
101 case 0x11: O <<
"lt_oq";
break;
102 case 0x12: O <<
"le_oq";
break;
103 case 0x13: O <<
"unord_s";
break;
104 case 0x14: O <<
"neq_us";
break;
105 case 0x15: O <<
"nlt_uq";
break;
106 case 0x16: O <<
"nle_uq";
break;
107 case 0x17: O <<
"ord_s";
break;
108 case 0x18: O <<
"eq_us";
break;
109 case 0x19: O <<
"nge_uq";
break;
110 case 0x1a: O <<
"ngt_uq";
break;
111 case 0x1b: O <<
"false_os";
break;
112 case 0x1c: O <<
"neq_os";
break;
113 case 0x1d: O <<
"ge_oq";
break;
114 case 0x1e: O <<
"gt_oq";
break;
115 case 0x1f: O <<
"true_us";
break;
123 int64_t Imm =
MI->getOperand(
MI->getNumOperands() - 1).getImm();
126 case 0:
OS <<
"lt";
break;
127 case 1:
OS <<
"le";
break;
128 case 2:
OS <<
"gt";
break;
129 case 3:
OS <<
"ge";
break;
130 case 4:
OS <<
"eq";
break;
131 case 5:
OS <<
"neq";
break;
132 case 6:
OS <<
"false";
break;
133 case 7:
OS <<
"true";
break;
136 switch (
MI->getOpcode()) {
138 case X86::VPCOMBmi:
case X86::VPCOMBri:
OS <<
"b\t";
break;
139 case X86::VPCOMDmi:
case X86::VPCOMDri:
OS <<
"d\t";
break;
140 case X86::VPCOMQmi:
case X86::VPCOMQri:
OS <<
"q\t";
break;
141 case X86::VPCOMUBmi:
case X86::VPCOMUBri:
OS <<
"ub\t";
break;
142 case X86::VPCOMUDmi:
case X86::VPCOMUDri:
OS <<
"ud\t";
break;
143 case X86::VPCOMUQmi:
case X86::VPCOMUQri:
OS <<
"uq\t";
break;
144 case X86::VPCOMUWmi:
case X86::VPCOMUWri:
OS <<
"uw\t";
break;
145 case X86::VPCOMWmi:
case X86::VPCOMWri:
OS <<
"w\t";
break;
155 switch (
MI->getOpcode()) {
157 case X86::VPCMPBZ128rmi:
case X86::VPCMPBZ128rri:
158 case X86::VPCMPBZ256rmi:
case X86::VPCMPBZ256rri:
159 case X86::VPCMPBZrmi:
case X86::VPCMPBZrri:
160 case X86::VPCMPBZ128rmik:
case X86::VPCMPBZ128rrik:
161 case X86::VPCMPBZ256rmik:
case X86::VPCMPBZ256rrik:
162 case X86::VPCMPBZrmik:
case X86::VPCMPBZrrik:
165 case X86::VPCMPDZ128rmi:
case X86::VPCMPDZ128rri:
166 case X86::VPCMPDZ256rmi:
case X86::VPCMPDZ256rri:
167 case X86::VPCMPDZrmi:
case X86::VPCMPDZrri:
168 case X86::VPCMPDZ128rmik:
case X86::VPCMPDZ128rrik:
169 case X86::VPCMPDZ256rmik:
case X86::VPCMPDZ256rrik:
170 case X86::VPCMPDZrmik:
case X86::VPCMPDZrrik:
171 case X86::VPCMPDZ128rmbi:
case X86::VPCMPDZ128rmbik:
172 case X86::VPCMPDZ256rmbi:
case X86::VPCMPDZ256rmbik:
173 case X86::VPCMPDZrmbi:
case X86::VPCMPDZrmbik:
176 case X86::VPCMPQZ128rmi:
case X86::VPCMPQZ128rri:
177 case X86::VPCMPQZ256rmi:
case X86::VPCMPQZ256rri:
178 case X86::VPCMPQZrmi:
case X86::VPCMPQZrri:
179 case X86::VPCMPQZ128rmik:
case X86::VPCMPQZ128rrik:
180 case X86::VPCMPQZ256rmik:
case X86::VPCMPQZ256rrik:
181 case X86::VPCMPQZrmik:
case X86::VPCMPQZrrik:
182 case X86::VPCMPQZ128rmbi:
case X86::VPCMPQZ128rmbik:
183 case X86::VPCMPQZ256rmbi:
case X86::VPCMPQZ256rmbik:
184 case X86::VPCMPQZrmbi:
case X86::VPCMPQZrmbik:
187 case X86::VPCMPUBZ128rmi:
case X86::VPCMPUBZ128rri:
188 case X86::VPCMPUBZ256rmi:
case X86::VPCMPUBZ256rri:
189 case X86::VPCMPUBZrmi:
case X86::VPCMPUBZrri:
190 case X86::VPCMPUBZ128rmik:
case X86::VPCMPUBZ128rrik:
191 case X86::VPCMPUBZ256rmik:
case X86::VPCMPUBZ256rrik:
192 case X86::VPCMPUBZrmik:
case X86::VPCMPUBZrrik:
195 case X86::VPCMPUDZ128rmi:
case X86::VPCMPUDZ128rri:
196 case X86::VPCMPUDZ256rmi:
case X86::VPCMPUDZ256rri:
197 case X86::VPCMPUDZrmi:
case X86::VPCMPUDZrri:
198 case X86::VPCMPUDZ128rmik:
case X86::VPCMPUDZ128rrik:
199 case X86::VPCMPUDZ256rmik:
case X86::VPCMPUDZ256rrik:
200 case X86::VPCMPUDZrmik:
case X86::VPCMPUDZrrik:
201 case X86::VPCMPUDZ128rmbi:
case X86::VPCMPUDZ128rmbik:
202 case X86::VPCMPUDZ256rmbi:
case X86::VPCMPUDZ256rmbik:
203 case X86::VPCMPUDZrmbi:
case X86::VPCMPUDZrmbik:
206 case X86::VPCMPUQZ128rmi:
case X86::VPCMPUQZ128rri:
207 case X86::VPCMPUQZ256rmi:
case X86::VPCMPUQZ256rri:
208 case X86::VPCMPUQZrmi:
case X86::VPCMPUQZrri:
209 case X86::VPCMPUQZ128rmik:
case X86::VPCMPUQZ128rrik:
210 case X86::VPCMPUQZ256rmik:
case X86::VPCMPUQZ256rrik:
211 case X86::VPCMPUQZrmik:
case X86::VPCMPUQZrrik:
212 case X86::VPCMPUQZ128rmbi:
case X86::VPCMPUQZ128rmbik:
213 case X86::VPCMPUQZ256rmbi:
case X86::VPCMPUQZ256rmbik:
214 case X86::VPCMPUQZrmbi:
case X86::VPCMPUQZrmbik:
217 case X86::VPCMPUWZ128rmi:
case X86::VPCMPUWZ128rri:
218 case X86::VPCMPUWZ256rri:
case X86::VPCMPUWZ256rmi:
219 case X86::VPCMPUWZrmi:
case X86::VPCMPUWZrri:
220 case X86::VPCMPUWZ128rmik:
case X86::VPCMPUWZ128rrik:
221 case X86::VPCMPUWZ256rrik:
case X86::VPCMPUWZ256rmik:
222 case X86::VPCMPUWZrmik:
case X86::VPCMPUWZrrik:
225 case X86::VPCMPWZ128rmi:
case X86::VPCMPWZ128rri:
226 case X86::VPCMPWZ256rmi:
case X86::VPCMPWZ256rri:
227 case X86::VPCMPWZrmi:
case X86::VPCMPWZrri:
228 case X86::VPCMPWZ128rmik:
case X86::VPCMPWZ128rrik:
229 case X86::VPCMPWZ256rmik:
case X86::VPCMPWZ256rrik:
230 case X86::VPCMPWZrmik:
case X86::VPCMPWZrrik:
238 OS << (IsVCmp ?
"vcmp" :
"cmp");
242 switch (
MI->getOpcode()) {
244 case X86::CMPPDrmi:
case X86::CMPPDrri:
245 case X86::VCMPPDrmi:
case X86::VCMPPDrri:
246 case X86::VCMPPDYrmi:
case X86::VCMPPDYrri:
247 case X86::VCMPPDZ128rmi:
case X86::VCMPPDZ128rri:
248 case X86::VCMPPDZ256rmi:
case X86::VCMPPDZ256rri:
249 case X86::VCMPPDZrmi:
case X86::VCMPPDZrri:
250 case X86::VCMPPDZ128rmik:
case X86::VCMPPDZ128rrik:
251 case X86::VCMPPDZ256rmik:
case X86::VCMPPDZ256rrik:
252 case X86::VCMPPDZrmik:
case X86::VCMPPDZrrik:
253 case X86::VCMPPDZ128rmbi:
case X86::VCMPPDZ128rmbik:
254 case X86::VCMPPDZ256rmbi:
case X86::VCMPPDZ256rmbik:
255 case X86::VCMPPDZrmbi:
case X86::VCMPPDZrmbik:
256 case X86::VCMPPDZrrib:
case X86::VCMPPDZrribk:
259 case X86::CMPPSrmi:
case X86::CMPPSrri:
260 case X86::VCMPPSrmi:
case X86::VCMPPSrri:
261 case X86::VCMPPSYrmi:
case X86::VCMPPSYrri:
262 case X86::VCMPPSZ128rmi:
case X86::VCMPPSZ128rri:
263 case X86::VCMPPSZ256rmi:
case X86::VCMPPSZ256rri:
264 case X86::VCMPPSZrmi:
case X86::VCMPPSZrri:
265 case X86::VCMPPSZ128rmik:
case X86::VCMPPSZ128rrik:
266 case X86::VCMPPSZ256rmik:
case X86::VCMPPSZ256rrik:
267 case X86::VCMPPSZrmik:
case X86::VCMPPSZrrik:
268 case X86::VCMPPSZ128rmbi:
case X86::VCMPPSZ128rmbik:
269 case X86::VCMPPSZ256rmbi:
case X86::VCMPPSZ256rmbik:
270 case X86::VCMPPSZrmbi:
case X86::VCMPPSZrmbik:
271 case X86::VCMPPSZrrib:
case X86::VCMPPSZrribk:
274 case X86::CMPSDrmi:
case X86::CMPSDrri:
275 case X86::CMPSDrmi_Int:
case X86::CMPSDrri_Int:
276 case X86::VCMPSDrmi:
case X86::VCMPSDrri:
277 case X86::VCMPSDrmi_Int:
case X86::VCMPSDrri_Int:
278 case X86::VCMPSDZrmi:
case X86::VCMPSDZrri:
279 case X86::VCMPSDZrmi_Int:
case X86::VCMPSDZrri_Int:
280 case X86::VCMPSDZrmi_Intk:
case X86::VCMPSDZrri_Intk:
281 case X86::VCMPSDZrrib_Int:
case X86::VCMPSDZrrib_Intk:
284 case X86::CMPSSrmi:
case X86::CMPSSrri:
285 case X86::CMPSSrmi_Int:
case X86::CMPSSrri_Int:
286 case X86::VCMPSSrmi:
case X86::VCMPSSrri:
287 case X86::VCMPSSrmi_Int:
case X86::VCMPSSrri_Int:
288 case X86::VCMPSSZrmi:
case X86::VCMPSSZrri:
289 case X86::VCMPSSZrmi_Int:
case X86::VCMPSSZrri_Int:
290 case X86::VCMPSSZrmi_Intk:
case X86::VCMPSSZrri_Intk:
291 case X86::VCMPSSZrrib_Int:
case X86::VCMPSSZrrib_Intk:
294 case X86::VCMPPHZ128rmi:
case X86::VCMPPHZ128rri:
295 case X86::VCMPPHZ256rmi:
case X86::VCMPPHZ256rri:
296 case X86::VCMPPHZrmi:
case X86::VCMPPHZrri:
297 case X86::VCMPPHZ128rmik:
case X86::VCMPPHZ128rrik:
298 case X86::VCMPPHZ256rmik:
case X86::VCMPPHZ256rrik:
299 case X86::VCMPPHZrmik:
case X86::VCMPPHZrrik:
300 case X86::VCMPPHZ128rmbi:
case X86::VCMPPHZ128rmbik:
301 case X86::VCMPPHZ256rmbi:
case X86::VCMPPHZ256rmbik:
302 case X86::VCMPPHZrmbi:
case X86::VCMPPHZrmbik:
303 case X86::VCMPPHZrrib:
case X86::VCMPPHZrribk:
306 case X86::VCMPSHZrmi:
case X86::VCMPSHZrri:
307 case X86::VCMPSHZrmi_Int:
case X86::VCMPSHZrri_Int:
308 case X86::VCMPSHZrrib_Int:
case X86::VCMPSHZrrib_Intk:
309 case X86::VCMPSHZrmi_Intk:
case X86::VCMPSHZrri_Intk:
312 case X86::VCMPPBF16Z128rmi:
case X86::VCMPPBF16Z128rri:
313 case X86::VCMPPBF16Z256rmi:
case X86::VCMPPBF16Z256rri:
314 case X86::VCMPPBF16Zrmi:
case X86::VCMPPBF16Zrri:
315 case X86::VCMPPBF16Z128rmik:
case X86::VCMPPBF16Z128rrik:
316 case X86::VCMPPBF16Z256rmik:
case X86::VCMPPBF16Z256rrik:
317 case X86::VCMPPBF16Zrmik:
case X86::VCMPPBF16Zrrik:
318 case X86::VCMPPBF16Z128rmbi:
case X86::VCMPPBF16Z128rmbik:
319 case X86::VCMPPBF16Z256rmbi:
case X86::VCMPPBF16Z256rmbik:
320 case X86::VCMPPBF16Zrmbi:
case X86::VCMPPBF16Zrmbik:
328 int64_t Imm =
MI->getOperand(
Op).getImm();
368 assert(
Op.isExpr() &&
"unknown pcrel immediate operand");
371 const MCConstantExpr *BranchTarget = dyn_cast<MCConstantExpr>(
Op.getExpr());
373 if (BranchTarget && BranchTarget->evaluateAsAbsolute(
Address)) {
384 if (
MI->getOperand(OpNo).getReg()) {
394 unsigned Flags =
MI->getFlags();
429 if (MemoryOperand != -1)
450 switch (
MI->getOperand(OpNo).getReg()) {
469 switch (
MI->getOperand(OpNo).getReg()) {
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This class represents an Operation in the Expression.
bool print(raw_ostream &OS, DIDumpOptions DumpOpts, const DWARFExpression *Expr, DWARFUnit *U) const
unsigned getCodePointerSize() const
Get the code pointer size in bytes.
WithMarkup markup(raw_ostream &OS, Markup M)
format_object< int64_t > formatHex(int64_t Value) const
bool SymbolizeOperands
If true, symbolize branch target and memory reference operands.
format_object< int64_t > formatImm(int64_t Value) const
Utility function to print immediates in decimal or hex.
bool PrintBranchImmAsAddress
If true, a branch immediate (e.g.
virtual void printRegName(raw_ostream &OS, MCRegister Reg)
Print the assembler register name.
Instances of this class represent a single low-level machine instruction.
Describe properties that are true of each instruction in the target description file.
const MCInstrDesc & get(unsigned Opcode) const
Return the machine instruction descriptor that corresponds to the specified instruction opcode.
Instances of this class represent operands of the MCInst class.
Generic base class for all target subtargets.
bool hasFeature(unsigned Feature) const
StringRef - Represent a constant reference to a string, i.e.
StringRef rtrim(char Char) const
Return string with consecutive Char characters starting from the right removed.
Target - Wrapper for Target specific information.
void printRoundingControl(const MCInst *MI, unsigned Op, raw_ostream &O)
void printPCRelImm(const MCInst *MI, uint64_t Address, unsigned OpNo, raw_ostream &O)
value (e.g.
void printOptionalSegReg(const MCInst *MI, unsigned OpNo, raw_ostream &O)
void printVPCOMMnemonic(const MCInst *MI, raw_ostream &OS)
void printTILEPair(const MCInst *MI, unsigned OpNo, raw_ostream &OS)
void printSSEAVXCC(const MCInst *MI, unsigned Op, raw_ostream &OS)
void printVKPair(const MCInst *MI, unsigned OpNo, raw_ostream &OS)
virtual void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O)=0
void printCondCode(const MCInst *MI, unsigned Op, raw_ostream &OS)
void printCondFlags(const MCInst *MI, unsigned Op, raw_ostream &OS)
void printCMPMnemonic(const MCInst *MI, bool IsVCmp, raw_ostream &OS)
void printInstFlags(const MCInst *MI, raw_ostream &O, const MCSubtargetInfo &STI)
void printVPCMPMnemonic(const MCInst *MI, raw_ostream &OS)
This class implements an extremely fast bulk output stream that can only output to a stream.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
@ ExplicitEVEXPrefix
For instructions that are promoted to EVEX space for EGPR.
@ ExplicitVEXPrefix
For instructions that use VEX encoding only when {vex}, {vex2} or {vex3} is present.
int getMemoryOperandNo(uint64_t TSFlags)
unsigned getOperandBias(const MCInstrDesc &Desc)
Compute whether all of the def operands are repeated in the uses and therefore should be skipped.
bool needsAddressSizeOverride(const MCInst &MI, const MCSubtargetInfo &STI, int MemoryOperand, uint64_t TSFlags)
Returns true if this instruction needs an Address-Size override prefix.
This is an optimization pass for GlobalISel generic memory operations.
Description of the encoding of one expression Op.