31 int64_t Imm =
MI->getOperand(
Op).getImm();
32 unsigned Opc =
MI->getOpcode();
33 bool IsCMPCCXADD = X86::isCMPCCXADD(Opc);
34 bool IsCCMPOrCTEST = X86::isCCMPCC(Opc) || X86::isCTESTCC(Opc);
39 case 0: O <<
"o";
break;
40 case 1: O <<
"no";
break;
41 case 2: O <<
"b";
break;
42 case 3: O << (IsCMPCCXADD ?
"nb" :
"ae");
break;
43 case 4: O << (IsCMPCCXADD ?
"z" :
"e");
break;
44 case 5: O << (IsCMPCCXADD ?
"nz" :
"ne");
break;
45 case 6: O <<
"be";
break;
46 case 7: O << (IsCMPCCXADD ?
"nbe" :
"a");
break;
47 case 8: O <<
"s";
break;
48 case 9: O <<
"ns";
break;
49 case 0xa: O << (IsCCMPOrCTEST ?
"t" :
"p");
break;
50 case 0xb: O << (IsCCMPOrCTEST ?
"f" :
"np");
break;
51 case 0xc: O <<
"l";
break;
52 case 0xd: O << (IsCMPCCXADD ?
"nl" :
"ge");
break;
53 case 0xe: O <<
"le";
break;
54 case 0xf: O << (IsCMPCCXADD ?
"nle" :
"g");
break;
64 int64_t Imm =
MI->getOperand(
Op).getImm();
65 assert(Imm >= 0 && Imm < 16 &&
"Invalid condition flags");
77 O << SimplifiedFlags <<
"}";
82 int64_t Imm =
MI->getOperand(
Op).getImm();
85 case 0: O <<
"eq";
break;
86 case 1: O <<
"lt";
break;
87 case 2: O <<
"le";
break;
88 case 3: O <<
"unord";
break;
89 case 4: O <<
"neq";
break;
90 case 5: O <<
"nlt";
break;
91 case 6: O <<
"nle";
break;
92 case 7: O <<
"ord";
break;
93 case 8: O <<
"eq_uq";
break;
94 case 9: O <<
"nge";
break;
95 case 0xa: O <<
"ngt";
break;
96 case 0xb: O <<
"false";
break;
97 case 0xc: O <<
"neq_oq";
break;
98 case 0xd: O <<
"ge";
break;
99 case 0xe: O <<
"gt";
break;
100 case 0xf: O <<
"true";
break;
101 case 0x10: O <<
"eq_os";
break;
102 case 0x11: O <<
"lt_oq";
break;
103 case 0x12: O <<
"le_oq";
break;
104 case 0x13: O <<
"unord_s";
break;
105 case 0x14: O <<
"neq_us";
break;
106 case 0x15: O <<
"nlt_uq";
break;
107 case 0x16: O <<
"nle_uq";
break;
108 case 0x17: O <<
"ord_s";
break;
109 case 0x18: O <<
"eq_us";
break;
110 case 0x19: O <<
"nge_uq";
break;
111 case 0x1a: O <<
"ngt_uq";
break;
112 case 0x1b: O <<
"false_os";
break;
113 case 0x1c: O <<
"neq_os";
break;
114 case 0x1d: O <<
"ge_oq";
break;
115 case 0x1e: O <<
"gt_oq";
break;
116 case 0x1f: O <<
"true_us";
break;
124 int64_t Imm =
MI->getOperand(
MI->getNumOperands() - 1).getImm();
127 case 0:
OS <<
"lt";
break;
128 case 1:
OS <<
"le";
break;
129 case 2:
OS <<
"gt";
break;
130 case 3:
OS <<
"ge";
break;
131 case 4:
OS <<
"eq";
break;
132 case 5:
OS <<
"neq";
break;
133 case 6:
OS <<
"false";
break;
134 case 7:
OS <<
"true";
break;
137 switch (
MI->getOpcode()) {
139 case X86::VPCOMBmi:
case X86::VPCOMBri:
OS <<
"b\t";
break;
140 case X86::VPCOMDmi:
case X86::VPCOMDri:
OS <<
"d\t";
break;
141 case X86::VPCOMQmi:
case X86::VPCOMQri:
OS <<
"q\t";
break;
142 case X86::VPCOMUBmi:
case X86::VPCOMUBri:
OS <<
"ub\t";
break;
143 case X86::VPCOMUDmi:
case X86::VPCOMUDri:
OS <<
"ud\t";
break;
144 case X86::VPCOMUQmi:
case X86::VPCOMUQri:
OS <<
"uq\t";
break;
145 case X86::VPCOMUWmi:
case X86::VPCOMUWri:
OS <<
"uw\t";
break;
146 case X86::VPCOMWmi:
case X86::VPCOMWri:
OS <<
"w\t";
break;
156 switch (
MI->getOpcode()) {
158 case X86::VPCMPBZ128rmi:
case X86::VPCMPBZ128rri:
159 case X86::VPCMPBZ256rmi:
case X86::VPCMPBZ256rri:
160 case X86::VPCMPBZrmi:
case X86::VPCMPBZrri:
161 case X86::VPCMPBZ128rmik:
case X86::VPCMPBZ128rrik:
162 case X86::VPCMPBZ256rmik:
case X86::VPCMPBZ256rrik:
163 case X86::VPCMPBZrmik:
case X86::VPCMPBZrrik:
166 case X86::VPCMPDZ128rmi:
case X86::VPCMPDZ128rri:
167 case X86::VPCMPDZ256rmi:
case X86::VPCMPDZ256rri:
168 case X86::VPCMPDZrmi:
case X86::VPCMPDZrri:
169 case X86::VPCMPDZ128rmik:
case X86::VPCMPDZ128rrik:
170 case X86::VPCMPDZ256rmik:
case X86::VPCMPDZ256rrik:
171 case X86::VPCMPDZrmik:
case X86::VPCMPDZrrik:
172 case X86::VPCMPDZ128rmib:
case X86::VPCMPDZ128rmibk:
173 case X86::VPCMPDZ256rmib:
case X86::VPCMPDZ256rmibk:
174 case X86::VPCMPDZrmib:
case X86::VPCMPDZrmibk:
177 case X86::VPCMPQZ128rmi:
case X86::VPCMPQZ128rri:
178 case X86::VPCMPQZ256rmi:
case X86::VPCMPQZ256rri:
179 case X86::VPCMPQZrmi:
case X86::VPCMPQZrri:
180 case X86::VPCMPQZ128rmik:
case X86::VPCMPQZ128rrik:
181 case X86::VPCMPQZ256rmik:
case X86::VPCMPQZ256rrik:
182 case X86::VPCMPQZrmik:
case X86::VPCMPQZrrik:
183 case X86::VPCMPQZ128rmib:
case X86::VPCMPQZ128rmibk:
184 case X86::VPCMPQZ256rmib:
case X86::VPCMPQZ256rmibk:
185 case X86::VPCMPQZrmib:
case X86::VPCMPQZrmibk:
188 case X86::VPCMPUBZ128rmi:
case X86::VPCMPUBZ128rri:
189 case X86::VPCMPUBZ256rmi:
case X86::VPCMPUBZ256rri:
190 case X86::VPCMPUBZrmi:
case X86::VPCMPUBZrri:
191 case X86::VPCMPUBZ128rmik:
case X86::VPCMPUBZ128rrik:
192 case X86::VPCMPUBZ256rmik:
case X86::VPCMPUBZ256rrik:
193 case X86::VPCMPUBZrmik:
case X86::VPCMPUBZrrik:
196 case X86::VPCMPUDZ128rmi:
case X86::VPCMPUDZ128rri:
197 case X86::VPCMPUDZ256rmi:
case X86::VPCMPUDZ256rri:
198 case X86::VPCMPUDZrmi:
case X86::VPCMPUDZrri:
199 case X86::VPCMPUDZ128rmik:
case X86::VPCMPUDZ128rrik:
200 case X86::VPCMPUDZ256rmik:
case X86::VPCMPUDZ256rrik:
201 case X86::VPCMPUDZrmik:
case X86::VPCMPUDZrrik:
202 case X86::VPCMPUDZ128rmib:
case X86::VPCMPUDZ128rmibk:
203 case X86::VPCMPUDZ256rmib:
case X86::VPCMPUDZ256rmibk:
204 case X86::VPCMPUDZrmib:
case X86::VPCMPUDZrmibk:
207 case X86::VPCMPUQZ128rmi:
case X86::VPCMPUQZ128rri:
208 case X86::VPCMPUQZ256rmi:
case X86::VPCMPUQZ256rri:
209 case X86::VPCMPUQZrmi:
case X86::VPCMPUQZrri:
210 case X86::VPCMPUQZ128rmik:
case X86::VPCMPUQZ128rrik:
211 case X86::VPCMPUQZ256rmik:
case X86::VPCMPUQZ256rrik:
212 case X86::VPCMPUQZrmik:
case X86::VPCMPUQZrrik:
213 case X86::VPCMPUQZ128rmib:
case X86::VPCMPUQZ128rmibk:
214 case X86::VPCMPUQZ256rmib:
case X86::VPCMPUQZ256rmibk:
215 case X86::VPCMPUQZrmib:
case X86::VPCMPUQZrmibk:
218 case X86::VPCMPUWZ128rmi:
case X86::VPCMPUWZ128rri:
219 case X86::VPCMPUWZ256rri:
case X86::VPCMPUWZ256rmi:
220 case X86::VPCMPUWZrmi:
case X86::VPCMPUWZrri:
221 case X86::VPCMPUWZ128rmik:
case X86::VPCMPUWZ128rrik:
222 case X86::VPCMPUWZ256rrik:
case X86::VPCMPUWZ256rmik:
223 case X86::VPCMPUWZrmik:
case X86::VPCMPUWZrrik:
226 case X86::VPCMPWZ128rmi:
case X86::VPCMPWZ128rri:
227 case X86::VPCMPWZ256rmi:
case X86::VPCMPWZ256rri:
228 case X86::VPCMPWZrmi:
case X86::VPCMPWZrri:
229 case X86::VPCMPWZ128rmik:
case X86::VPCMPWZ128rrik:
230 case X86::VPCMPWZ256rmik:
case X86::VPCMPWZ256rrik:
231 case X86::VPCMPWZrmik:
case X86::VPCMPWZrrik:
239 OS << (IsVCmp ?
"vcmp" :
"cmp");
243 switch (
MI->getOpcode()) {
245 case X86::CMPPDrmi:
case X86::CMPPDrri:
246 case X86::VCMPPDrmi:
case X86::VCMPPDrri:
247 case X86::VCMPPDYrmi:
case X86::VCMPPDYrri:
248 case X86::VCMPPDZ128rmi:
case X86::VCMPPDZ128rri:
249 case X86::VCMPPDZ256rmi:
case X86::VCMPPDZ256rri:
250 case X86::VCMPPDZrmi:
case X86::VCMPPDZrri:
251 case X86::VCMPPDZ128rmik:
case X86::VCMPPDZ128rrik:
252 case X86::VCMPPDZ256rmik:
case X86::VCMPPDZ256rrik:
253 case X86::VCMPPDZrmik:
case X86::VCMPPDZrrik:
254 case X86::VCMPPDZ128rmbi:
case X86::VCMPPDZ128rmbik:
255 case X86::VCMPPDZ256rmbi:
case X86::VCMPPDZ256rmbik:
256 case X86::VCMPPDZrmbi:
case X86::VCMPPDZrmbik:
257 case X86::VCMPPDZrrib:
case X86::VCMPPDZrribk:
260 case X86::CMPPSrmi:
case X86::CMPPSrri:
261 case X86::VCMPPSrmi:
case X86::VCMPPSrri:
262 case X86::VCMPPSYrmi:
case X86::VCMPPSYrri:
263 case X86::VCMPPSZ128rmi:
case X86::VCMPPSZ128rri:
264 case X86::VCMPPSZ256rmi:
case X86::VCMPPSZ256rri:
265 case X86::VCMPPSZrmi:
case X86::VCMPPSZrri:
266 case X86::VCMPPSZ128rmik:
case X86::VCMPPSZ128rrik:
267 case X86::VCMPPSZ256rmik:
case X86::VCMPPSZ256rrik:
268 case X86::VCMPPSZrmik:
case X86::VCMPPSZrrik:
269 case X86::VCMPPSZ128rmbi:
case X86::VCMPPSZ128rmbik:
270 case X86::VCMPPSZ256rmbi:
case X86::VCMPPSZ256rmbik:
271 case X86::VCMPPSZrmbi:
case X86::VCMPPSZrmbik:
272 case X86::VCMPPSZrrib:
case X86::VCMPPSZrribk:
275 case X86::CMPSDrmi:
case X86::CMPSDrri:
276 case X86::CMPSDrmi_Int:
case X86::CMPSDrri_Int:
277 case X86::VCMPSDrmi:
case X86::VCMPSDrri:
278 case X86::VCMPSDrmi_Int:
case X86::VCMPSDrri_Int:
279 case X86::VCMPSDZrmi:
case X86::VCMPSDZrri:
280 case X86::VCMPSDZrmi_Int:
case X86::VCMPSDZrri_Int:
281 case X86::VCMPSDZrmi_Intk:
case X86::VCMPSDZrri_Intk:
282 case X86::VCMPSDZrrib_Int:
case X86::VCMPSDZrrib_Intk:
285 case X86::CMPSSrmi:
case X86::CMPSSrri:
286 case X86::CMPSSrmi_Int:
case X86::CMPSSrri_Int:
287 case X86::VCMPSSrmi:
case X86::VCMPSSrri:
288 case X86::VCMPSSrmi_Int:
case X86::VCMPSSrri_Int:
289 case X86::VCMPSSZrmi:
case X86::VCMPSSZrri:
290 case X86::VCMPSSZrmi_Int:
case X86::VCMPSSZrri_Int:
291 case X86::VCMPSSZrmi_Intk:
case X86::VCMPSSZrri_Intk:
292 case X86::VCMPSSZrrib_Int:
case X86::VCMPSSZrrib_Intk:
295 case X86::VCMPPHZ128rmi:
case X86::VCMPPHZ128rri:
296 case X86::VCMPPHZ256rmi:
case X86::VCMPPHZ256rri:
297 case X86::VCMPPHZrmi:
case X86::VCMPPHZrri:
298 case X86::VCMPPHZ128rmik:
case X86::VCMPPHZ128rrik:
299 case X86::VCMPPHZ256rmik:
case X86::VCMPPHZ256rrik:
300 case X86::VCMPPHZrmik:
case X86::VCMPPHZrrik:
301 case X86::VCMPPHZ128rmbi:
case X86::VCMPPHZ128rmbik:
302 case X86::VCMPPHZ256rmbi:
case X86::VCMPPHZ256rmbik:
303 case X86::VCMPPHZrmbi:
case X86::VCMPPHZrmbik:
304 case X86::VCMPPHZrrib:
case X86::VCMPPHZrribk:
307 case X86::VCMPSHZrmi:
case X86::VCMPSHZrri:
308 case X86::VCMPSHZrmi_Int:
case X86::VCMPSHZrri_Int:
309 case X86::VCMPSHZrrib_Int:
case X86::VCMPSHZrrib_Intk:
310 case X86::VCMPSHZrmi_Intk:
case X86::VCMPSHZrri_Intk:
318 int64_t Imm =
MI->getOperand(
Op).getImm();
358 assert(
Op.isExpr() &&
"unknown pcrel immediate operand");
361 const MCConstantExpr *BranchTarget = dyn_cast<MCConstantExpr>(
Op.getExpr());
363 if (BranchTarget && BranchTarget->evaluateAsAbsolute(
Address)) {
374 if (
MI->getOperand(OpNo).getReg()) {
384 unsigned Flags =
MI->getFlags();
419 if (MemoryOperand != -1)
440 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.
format_object< int64_t > formatHex(int64_t Value) const
bool SymbolizeOperands
If true, symbolize branch target and memory reference operands.
virtual void printRegName(raw_ostream &OS, MCRegister Reg) const
Print the assembler register name.
WithMarkup markup(raw_ostream &OS, Markup M) const
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.
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 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.