[Clang] Add numeric for iota.
[llvm-project.git] / llvm / test / MC / X86 / x86-32.s
blobe3d473a05e59d02981bc6d5ed254c8823f3fedd6
1 // RUN: llvm-mc -triple i386-unknown-unknown --show-encoding %s | FileCheck %s
3 pause
4 // CHECK: pause
5 // CHECK: encoding: [0xf3,0x90]
6 sfence
7 // CHECK: sfence
8 // CHECK: encoding: [0x0f,0xae,0xf8]
9 lfence
10 // CHECK: lfence
11 // CHECK: encoding: [0x0f,0xae,0xe8]
12 mfence
13 // CHECK: mfence
14 // CHECK: encoding: [0x0f,0xae,0xf0]
15 monitor
16 // CHECK: monitor
17 // CHECK: encoding: [0x0f,0x01,0xc8]
18 monitor %eax, %ecx, %edx
19 // CHECK: monitor
20 // CHECK: encoding: [0x0f,0x01,0xc8]
21 mwait
22 // CHECK: mwait
23 // CHECK: encoding: [0x0f,0x01,0xc9]
24 mwait %eax, %ecx
25 // CHECK: mwait
26 // CHECK: encoding: [0x0f,0x01,0xc9]
28 vmcall
29 // CHECK: vmcall
30 // CHECK: encoding: [0x0f,0x01,0xc1]
31 vmfunc
32 // CHECK: vmfunc
33 // CHECK: encoding: [0x0f,0x01,0xd4]
34 vmlaunch
35 // CHECK: vmlaunch
36 // CHECK: encoding: [0x0f,0x01,0xc2]
37 vmresume
38 // CHECK: vmresume
39 // CHECK: encoding: [0x0f,0x01,0xc3]
40 vmxoff
41 // CHECK: vmxoff
42 // CHECK: encoding: [0x0f,0x01,0xc4]
43 swapgs
44 // CHECK: swapgs
45 // CHECK: encoding: [0x0f,0x01,0xf8]
47 vmrun %eax
48 // CHECK: vmrun
49 // CHECK: encoding: [0x0f,0x01,0xd8]
50 vmmcall
51 // CHECK: vmmcall
52 // CHECK: encoding: [0x0f,0x01,0xd9]
53 vmload %eax
54 // CHECK: vmload
55 // CHECK: encoding: [0x0f,0x01,0xda]
56 vmsave %eax
57 // CHECK: vmsave
58 // CHECK: encoding: [0x0f,0x01,0xdb]
59 stgi
60 // CHECK: stgi
61 // CHECK: encoding: [0x0f,0x01,0xdc]
62 clgi
63 // CHECK: clgi
64 // CHECK: encoding: [0x0f,0x01,0xdd]
65 skinit %eax
66 // CHECK: skinit
67 // CHECK: encoding: [0x0f,0x01,0xde]
68 invlpga %eax, %ecx
69 // CHECK: invlpga
70 // CHECK: encoding: [0x0f,0x01,0xdf]
72 rdtscp
73 // CHECK: rdtscp
74 // CHECK: encoding: [0x0f,0x01,0xf9]
77 // CHECK: movl %eax, 16(%ebp) # encoding: [0x89,0x45,0x10]
78 movl %eax, 16(%ebp)
79 // CHECK: movl %eax, -16(%ebp) # encoding: [0x89,0x45,0xf0]
80 movl %eax, -16(%ebp)
82 // CHECK: testb %bl, %cl # encoding: [0x84,0xd9]
83 testb %bl, %cl
85 // CHECK: cmpl %eax, %ebx # encoding: [0x39,0xc3]
86 cmpl %eax, %ebx
88 // CHECK: addw %ax, %ax # encoding: [0x66,0x01,0xc0]
89 addw %ax, %ax
91 // CHECK: shrl %eax # encoding: [0xd1,0xe8]
92 shrl $1, %eax
94 // CHECK: shll %eax # encoding: [0xd1,0xe0]
95 sall $1, %eax
96 // CHECK: shll %eax # encoding: [0xd1,0xe0]
97 sal $1, %eax
99 // moffset forms of moves, rdar://7947184
100 movb 0, %al // CHECK: movb 0, %al # encoding: [0xa0,0x00,0x00,0x00,0x00]
101 movw 0, %ax // CHECK: movw 0, %ax # encoding: [0x66,0xa1,0x00,0x00,0x00,0x00]
102 movl 0, %eax // CHECK: movl 0, %eax # encoding: [0xa1,0x00,0x00,0x00,0x00]
104 // rdar://7973775
105 into
106 // CHECK: into
107 // CHECK: encoding: [0xce]
108 int3
109 // CHECK: int3
110 // CHECK: encoding: [0xcc]
111 int $4
112 // CHECK: int $4
113 // CHECK: encoding: [0xcd,0x04]
114 int $255
115 // CHECK: int $255
116 // CHECK: encoding: [0xcd,0xff]
118 // CHECK: pushfl # encoding: [0x9c]
119 pushf
120 // CHECK: pushfl # encoding: [0x9c]
121 pushfl
122 // CHECK: popfl # encoding: [0x9d]
123 popf
124 // CHECK: popfl # encoding: [0x9d]
125 popfl
127 // rdar://8014869
128 retl
129 // CHECK: ret
130 // CHECK: encoding: [0xc3]
132 // rdar://7973854
133 // CHECK: cmoval %eax, %edx
134 // CHECK: encoding: [0x0f,0x47,0xd0]
135 cmoval %eax,%edx
137 // CHECK: cmovael %eax, %edx
138 // CHECK: encoding: [0x0f,0x43,0xd0]
139 cmovael %eax,%edx
141 // CHECK: cmovbel %eax, %edx
142 // CHECK: encoding: [0x0f,0x46,0xd0]
143 cmovbel %eax,%edx
145 // CHECK: cmovbl %eax, %edx
146 // CHECK: encoding: [0x0f,0x42,0xd0]
147 cmovbl %eax,%edx
149 // CHECK: cmovbw %bx, %bx
150 cmovnae %bx,%bx
153 // CHECK: cmovbel %eax, %edx
154 // CHECK: encoding: [0x0f,0x46,0xd0]
155 cmovbel %eax,%edx
157 // CHECK: cmovbl %eax, %edx
158 // CHECK: encoding: [0x0f,0x42,0xd0]
159 cmovcl %eax,%edx
161 // CHECK: cmovel %eax, %edx
162 // CHECK: encoding: [0x0f,0x44,0xd0]
163 cmovel %eax,%edx
165 // CHECK: cmovgl %eax, %edx
166 // CHECK: encoding: [0x0f,0x4f,0xd0]
167 cmovgl %eax,%edx
169 // CHECK: cmovgel %eax, %edx
170 // CHECK: encoding: [0x0f,0x4d,0xd0]
171 cmovgel %eax,%edx
173 // CHECK: cmovll %eax, %edx
174 // CHECK: encoding: [0x0f,0x4c,0xd0]
175 cmovll %eax,%edx
177 // CHECK: cmovlel %eax, %edx
178 // CHECK: encoding: [0x0f,0x4e,0xd0]
179 cmovlel %eax,%edx
181 // CHECK: cmovbel %eax, %edx
182 // CHECK: encoding: [0x0f,0x46,0xd0]
183 cmovnal %eax,%edx
185 // CHECK: cmovnel %eax, %edx
186 // CHECK: encoding: [0x0f,0x45,0xd0]
187 cmovnel %eax,%edx
189 // CHECK: cmovael %eax, %edx
190 // CHECK: encoding: [0x0f,0x43,0xd0]
191 cmovnbl %eax,%edx
193 // CHECK: cmoval %eax, %edx
194 // CHECK: encoding: [0x0f,0x47,0xd0]
195 cmovnbel %eax,%edx
197 // CHECK: cmovael %eax, %edx
198 // CHECK: encoding: [0x0f,0x43,0xd0]
199 cmovncl %eax,%edx
201 // CHECK: cmovnel %eax, %edx
202 // CHECK: encoding: [0x0f,0x45,0xd0]
203 cmovnel %eax,%edx
205 // CHECK: cmovlel %eax, %edx
206 // CHECK: encoding: [0x0f,0x4e,0xd0]
207 cmovngl %eax,%edx
209 // CHECK: cmovgel %eax, %edx
210 // CHECK: encoding: [0x0f,0x4d,0xd0]
211 cmovnl %eax,%edx
213 // CHECK: cmovnel %eax, %edx
214 // CHECK: encoding: [0x0f,0x45,0xd0]
215 cmovnel %eax,%edx
217 // CHECK: cmovlel %eax, %edx
218 // CHECK: encoding: [0x0f,0x4e,0xd0]
219 cmovngl %eax,%edx
221 // CHECK: cmovll %eax, %edx
222 // CHECK: encoding: [0x0f,0x4c,0xd0]
223 cmovngel %eax,%edx
225 // CHECK: cmovgel %eax, %edx
226 // CHECK: encoding: [0x0f,0x4d,0xd0]
227 cmovnll %eax,%edx
229 // CHECK: cmovgl %eax, %edx
230 // CHECK: encoding: [0x0f,0x4f,0xd0]
231 cmovnlel %eax,%edx
233 // CHECK: cmovnol %eax, %edx
234 // CHECK: encoding: [0x0f,0x41,0xd0]
235 cmovnol %eax,%edx
237 // CHECK: cmovnpl %eax, %edx
238 // CHECK: encoding: [0x0f,0x4b,0xd0]
239 cmovnpl %eax,%edx
241 // CHECK: cmovnsl %eax, %edx
242 // CHECK: encoding: [0x0f,0x49,0xd0]
243 cmovnsl %eax,%edx
245 // CHECK: cmovnel %eax, %edx
246 // CHECK: encoding: [0x0f,0x45,0xd0]
247 cmovnzl %eax,%edx
249 // CHECK: cmovol %eax, %edx
250 // CHECK: encoding: [0x0f,0x40,0xd0]
251 cmovol %eax,%edx
253 // CHECK: cmovpl %eax, %edx
254 // CHECK: encoding: [0x0f,0x4a,0xd0]
255 cmovpl %eax,%edx
257 // CHECK: cmovsl %eax, %edx
258 // CHECK: encoding: [0x0f,0x48,0xd0]
259 cmovsl %eax,%edx
261 // CHECK: cmovel %eax, %edx
262 // CHECK: encoding: [0x0f,0x44,0xd0]
263 cmovzl %eax,%edx
265 // CHECK: cmpeqps %xmm0, %xmm1
266 // CHECK: encoding: [0x0f,0xc2,0xc8,0x00]
267 cmpps $0, %xmm0, %xmm1
268 // CHECK: cmpeqps (%eax), %xmm1
269 // CHECK: encoding: [0x0f,0xc2,0x08,0x00]
270 cmpps $0, 0(%eax), %xmm1
271 // CHECK: cmpeqpd %xmm0, %xmm1
272 // CHECK: encoding: [0x66,0x0f,0xc2,0xc8,0x00]
273 cmppd $0, %xmm0, %xmm1
274 // CHECK: cmpeqpd (%eax), %xmm1
275 // CHECK: encoding: [0x66,0x0f,0xc2,0x08,0x00]
276 cmppd $0, 0(%eax), %xmm1
277 // CHECK: cmpeqss %xmm0, %xmm1
278 // CHECK: encoding: [0xf3,0x0f,0xc2,0xc8,0x00]
279 cmpss $0, %xmm0, %xmm1
280 // CHECK: cmpeqss (%eax), %xmm1
281 // CHECK: encoding: [0xf3,0x0f,0xc2,0x08,0x00]
282 cmpss $0, 0(%eax), %xmm1
283 // CHECK: cmpeqsd %xmm0, %xmm1
284 // CHECK: encoding: [0xf2,0x0f,0xc2,0xc8,0x00]
285 cmpsd $0, %xmm0, %xmm1
286 // CHECK: cmpeqsd (%eax), %xmm1
287 // CHECK: encoding: [0xf2,0x0f,0xc2,0x08,0x00]
288 cmpsd $0, 0(%eax), %xmm1
290 // Check matching of instructions which embed the SSE comparison code.
292 // CHECK: cmpeqps %xmm0, %xmm1
293 // CHECK: encoding: [0x0f,0xc2,0xc8,0x00]
294 cmpeqps %xmm0, %xmm1
296 // CHECK: cmpltpd %xmm0, %xmm1
297 // CHECK: encoding: [0x66,0x0f,0xc2,0xc8,0x01]
298 cmpltpd %xmm0, %xmm1
300 // CHECK: cmpless %xmm0, %xmm1
301 // CHECK: encoding: [0xf3,0x0f,0xc2,0xc8,0x02]
302 cmpless %xmm0, %xmm1
304 // CHECK: cmpunordpd %xmm0, %xmm1
305 // CHECK: encoding: [0x66,0x0f,0xc2,0xc8,0x03]
306 cmpunordpd %xmm0, %xmm1
308 // CHECK: cmpneqps %xmm0, %xmm1
309 // CHECK: encoding: [0x0f,0xc2,0xc8,0x04]
310 cmpneqps %xmm0, %xmm1
312 // CHECK: cmpnltpd %xmm0, %xmm1
313 // CHECK: encoding: [0x66,0x0f,0xc2,0xc8,0x05]
314 cmpnltpd %xmm0, %xmm1
316 // CHECK: cmpnless %xmm0, %xmm1
317 // CHECK: encoding: [0xf3,0x0f,0xc2,0xc8,0x06]
318 cmpnless %xmm0, %xmm1
320 // CHECK: cmpordsd %xmm0, %xmm1
321 // CHECK: encoding: [0xf2,0x0f,0xc2,0xc8,0x07]
322 cmpordsd %xmm0, %xmm1
324 // rdar://7995856
325 // CHECK: fmul %st(0)
326 // CHECK: encoding: [0xd8,0xc8]
327 fmul %st(0), %st
329 // CHECK: fadd %st(0)
330 // CHECK: encoding: [0xd8,0xc0]
331 fadd %st(0), %st
333 // CHECK: fsub %st(0)
334 // CHECK: encoding: [0xd8,0xe0]
335 fsub %st(0), %st
337 // CHECK: fsubr %st(0)
338 // CHECK: encoding: [0xd8,0xe8]
339 fsubr %st(0), %st
341 // CHECK: fdivr %st(0)
342 // CHECK: encoding: [0xd8,0xf8]
343 fdivr %st(0), %st
345 // CHECK: fdiv %st(0)
346 // CHECK: encoding: [0xd8,0xf0]
347 fdiv %st(0), %st
349 // radr://8017519
350 // CHECK: movl %cs, %eax
351 // CHECK: encoding: [0x8c,0xc8]
352 movl %cs, %eax
354 // CHECK: movw %cs, %ax
355 // CHECK: encoding: [0x66,0x8c,0xc8]
356 movw %cs, %ax
358 // CHECK: movw %cs, (%eax)
359 // CHECK: encoding: [0x8c,0x08]
360 mov %cs, (%eax)
362 // CHECK: movw %cs, (%eax)
363 // CHECK: encoding: [0x8c,0x08]
364 movw %cs, (%eax)
366 // CHECK: movl %eax, %cs
367 // CHECK: encoding: [0x8e,0xc8]
368 movl %eax, %cs
370 // CHECK: movl %eax, %cs
371 // CHECK: encoding: [0x8e,0xc8]
372 movw %ax, %cs
374 // CHECK: movl %eax, %cs
375 // CHECK: encoding: [0x8e,0xc8]
376 mov %eax, %cs
378 // CHECK: movl %eax, %cs
379 // CHECK: encoding: [0x8e,0xc8]
380 mov %ax, %cs
382 // CHECK: movw (%eax), %cs
383 // CHECK: encoding: [0x8e,0x08]
384 mov (%eax), %cs
386 // CHECK: movw (%eax), %cs
387 // CHECK: encoding: [0x8e,0x08]
388 movw (%eax), %cs
390 // radr://8033374
391 // CHECK: movl %cr0, %eax
392 // CHECK: encoding: [0x0f,0x20,0xc0]
393 movl %cr0,%eax
395 // CHECK: movl %cr1, %eax
396 // CHECK: encoding: [0x0f,0x20,0xc8]
397 movl %cr1,%eax
399 // CHECK: movl %cr2, %eax
400 // CHECK: encoding: [0x0f,0x20,0xd0]
401 movl %cr2,%eax
403 // CHECK: movl %cr3, %eax
404 // CHECK: encoding: [0x0f,0x20,0xd8]
405 movl %cr3,%eax
407 // CHECK: movl %cr4, %eax
408 // CHECK: encoding: [0x0f,0x20,0xe0]
409 movl %cr4,%eax
411 // CHECK: movl %dr0, %eax
412 // CHECK: encoding: [0x0f,0x21,0xc0]
413 movl %dr0,%eax
415 // CHECK: movl %dr1, %eax
416 // CHECK: encoding: [0x0f,0x21,0xc8]
417 movl %dr1,%eax
419 // CHECK: movl %dr1, %eax
420 // CHECK: encoding: [0x0f,0x21,0xc8]
421 movl %dr1,%eax
423 // CHECK: movl %dr2, %eax
424 // CHECK: encoding: [0x0f,0x21,0xd0]
425 movl %dr2,%eax
427 // CHECK: movl %dr3, %eax
428 // CHECK: encoding: [0x0f,0x21,0xd8]
429 movl %dr3,%eax
431 // CHECK: movl %dr4, %eax
432 // CHECK: encoding: [0x0f,0x21,0xe0]
433 movl %dr4,%eax
435 // CHECK: movl %dr5, %eax
436 // CHECK: encoding: [0x0f,0x21,0xe8]
437 movl %dr5,%eax
439 // CHECK: movl %dr6, %eax
440 // CHECK: encoding: [0x0f,0x21,0xf0]
441 movl %dr6,%eax
443 // CHECK: movl %dr7, %eax
444 // CHECK: encoding: [0x0f,0x21,0xf8]
445 movl %dr7,%eax
447 // CHECK: clzero
448 // CHECK: encoding: [0x0f,0x01,0xfc]
449 clzero
451 // CHECK: clzero
452 // CHECK: encoding: [0x0f,0x01,0xfc]
453 clzero %eax
455 // CHECK: tlbsync
456 // CHECK: encoding: [0x0f,0x01,0xff]
457 tlbsync
459 // CHECK: invlpgb
460 // CHECK: encoding: [0x0f,0x01,0xfe]
461 invlpgb %eax, %edx
463 // radr://8017522
464 // CHECK: wait
465 // CHECK: encoding: [0x9b]
466 fwait
468 // rdar://7873482
469 // CHECK: [0x65,0xa1,0x7c,0x00,0x00,0x00]
470 movl %gs:124, %eax
472 // CHECK: [0x65,0xa3,0x7c,0x00,0x00,0x00]
473 movl %eax, %gs:124
475 // CHECK: pushal
476 // CHECK: encoding: [0x60]
477 pusha
479 // CHECK: popal
480 // CHECK: encoding: [0x61]
481 popa
483 // CHECK: pushaw
484 // CHECK: encoding: [0x66,0x60]
485 pushaw
487 // CHECK: popaw
488 // CHECK: encoding: [0x66,0x61]
489 popaw
491 // CHECK: pushal
492 // CHECK: encoding: [0x60]
493 pushal
495 // CHECK: popal
496 // CHECK: encoding: [0x61]
497 popal
499 // CHECK: jmpl *8(%eax)
500 // CHECK: encoding: [0xff,0x60,0x08]
501 jmp *8(%eax)
503 // PR7465
504 // CHECK: lcalll $2, $4660
505 // CHECK: encoding: [0x9a,0x34,0x12,0x00,0x00,0x02,0x00]
506 lcalll $0x2, $0x1234
509 // rdar://8061602
511 jcxz L1
512 // CHECK: jcxz L1
513 // CHECK: encoding: [0x67,0xe3,A]
514 jecxz L1
515 // CHECK: jecxz L1
516 // CHECK: encoding: [0xe3,A]
518 // rdar://8403974
519 iret
520 // CHECK: iretl
521 // CHECK: encoding: [0xcf]
522 iretw
523 // CHECK: iretw
524 // CHECK: encoding: [0x66,0xcf]
525 iretl
526 // CHECK: iretl
527 // CHECK: encoding: [0xcf]
529 // rdar://8403907
530 sysret
531 // CHECK: sysretl
532 // CHECK: encoding: [0x0f,0x07]
533 sysretl
534 // CHECK: sysretl
535 // CHECK: encoding: [0x0f,0x07]
537 // rdar://8018260
538 testl %ecx, -24(%ebp)
539 // CHECK: testl %ecx, -24(%ebp)
540 testl -24(%ebp), %ecx
541 // CHECK: testl %ecx, -24(%ebp)
544 // rdar://8407242
545 push %cs
546 // CHECK: pushl %cs
547 // CHECK: encoding: [0x0e]
548 push %ds
549 // CHECK: pushl %ds
550 // CHECK: encoding: [0x1e]
551 push %ss
552 // CHECK: pushl %ss
553 // CHECK: encoding: [0x16]
554 push %es
555 // CHECK: pushl %es
556 // CHECK: encoding: [0x06]
557 push %fs
558 // CHECK: pushl %fs
559 // CHECK: encoding: [0x0f,0xa0]
560 push %gs
561 // CHECK: pushl %gs
562 // CHECK: encoding: [0x0f,0xa8]
564 pushw %cs
565 // CHECK: pushw %cs
566 // CHECK: encoding: [0x66,0x0e]
567 pushw %ds
568 // CHECK: pushw %ds
569 // CHECK: encoding: [0x66,0x1e]
570 pushw %ss
571 // CHECK: pushw %ss
572 // CHECK: encoding: [0x66,0x16]
573 pushw %es
574 // CHECK: pushw %es
575 // CHECK: encoding: [0x66,0x06]
576 pushw %fs
577 // CHECK: pushw %fs
578 // CHECK: encoding: [0x66,0x0f,0xa0]
579 pushw %gs
580 // CHECK: pushw %gs
581 // CHECK: encoding: [0x66,0x0f,0xa8]
583 pop %ss
584 // CHECK: popl %ss
585 // CHECK: encoding: [0x17]
586 pop %ds
587 // CHECK: popl %ds
588 // CHECK: encoding: [0x1f]
589 pop %es
590 // CHECK: popl %es
591 // CHECK: encoding: [0x07]
593 // rdar://8408129
594 pushfd
595 // CHECK: pushfl
596 popfd
597 // CHECK: popfl
598 pushfl
599 // CHECK: pushfl
600 popfl
601 // CHECK: popfl
604 // rdar://8416805
605 setc %bl
606 setnae %bl
607 setnb %bl
608 setnc %bl
609 setna %bl
610 setnbe %bl
611 setpe %bl
612 setpo %bl
613 setnge %bl
614 setnl %bl
615 setng %bl
616 setnle %bl
618 // PR8686
619 setneb %cl // CHECK: setne %cl
620 setcb %bl // CHECK: setb %bl
621 setnaeb %bl // CHECK: setb %bl
624 // PR8114
626 out %al, (%dx)
627 // CHECK: outb %al, %dx
628 outb %al, (%dx)
629 // CHECK: outb %al, %dx
630 out %ax, (%dx)
631 // CHECK: outw %ax, %dx
632 outw %ax, (%dx)
633 // CHECK: outw %ax, %dx
634 out %eax, (%dx)
635 // CHECK: outl %eax, %dx
636 outl %eax, (%dx)
637 // CHECK: outl %eax, %dx
640 in (%dx), %al
641 // CHECK: inb %dx, %al
642 inb (%dx), %al
643 // CHECK: inb %dx, %al
644 in (%dx), %ax
645 // CHECK: inw %dx, %ax
646 inw (%dx), %ax
647 // CHECK: inw %dx, %ax
648 in (%dx), %eax
649 // CHECK: inl %dx, %eax
650 inl (%dx), %eax
651 // CHECK: inl %dx, %eax
653 //PR15455
655 outsb (%esi), (%dx)
656 // CHECK: outsb (%esi), %dx
657 outsw (%esi), (%dx)
658 // CHECK: outsw (%esi), %dx
659 outsl (%esi), (%dx)
660 // CHECK: outsl (%esi), %dx
662 insb (%dx), %es:(%edi)
663 // CHECK: insb %dx, %es:(%edi)
664 insw (%dx), %es:(%edi)
665 // CHECK: insw %dx, %es:(%edi)
666 insl (%dx), %es:(%edi)
667 // CHECK: insl %dx, %es:(%edi)
669 // CHECK: lcalll $31438, $31438
670 // CHECK: lcalll $31438, $31438
671 // CHECK: ljmpl $31438, $31438
672 // CHECK: ljmpl $31438, $31438
674 calll $0x7ace,$0x7ace
675 lcalll $0x7ace,$0x7ace
676 jmpl $0x7ace,$0x7ace
677 ljmpl $0x7ace,$0x7ace
679 // CHECK: lcallw $31438, $31438
680 // CHECK: lcallw $31438, $31438
681 // CHECK: ljmpw $31438, $31438
682 // CHECK: ljmpw $31438, $31438
684 callw $0x7ace,$0x7ace
685 lcallw $0x7ace,$0x7ace
686 jmpw $0x7ace,$0x7ace
687 ljmpw $0x7ace,$0x7ace
689 // CHECK: lcalll $31438, $31438
690 // CHECK: lcalll $31438, $31438
691 // CHECK: ljmpl $31438, $31438
692 // CHECK: ljmpl $31438, $31438
694 call $0x7ace,$0x7ace
695 lcall $0x7ace,$0x7ace
696 jmp $0x7ace,$0x7ace
697 ljmp $0x7ace,$0x7ace
699 // rdar://8456370
700 // CHECK: calll a
701 calll a
703 // CHECK: incb %al # encoding: [0xfe,0xc0]
704 incb %al
706 // CHECK: incw %ax # encoding: [0x66,0x40]
707 incw %ax
709 // CHECK: incl %eax # encoding: [0x40]
710 incl %eax
712 // CHECK: decb %al # encoding: [0xfe,0xc8]
713 decb %al
715 // CHECK: decw %ax # encoding: [0x66,0x48]
716 decw %ax
718 // CHECK: decl %eax # encoding: [0x48]
719 decl %eax
721 // CHECK: pshufw $14, %mm4, %mm0 # encoding: [0x0f,0x70,0xc4,0x0e]
722 pshufw $14, %mm4, %mm0
724 // CHECK: pshufw $90, %mm4, %mm0 # encoding: [0x0f,0x70,0xc4,0x5a]
725 // PR8288
726 pshufw $90, %mm4, %mm0
728 // rdar://8416805
729 // CHECK: aaa
730 // CHECK: encoding: [0x37]
733 // CHECK: aad $1
734 // CHECK: encoding: [0xd5,0x01]
735 aad $1
737 // CHECK: aad
738 // CHECK: encoding: [0xd5,0x0a]
739 aad $0xA
741 // CHECK: aad
742 // CHECK: encoding: [0xd5,0x0a]
745 // CHECK: aam $2
746 // CHECK: encoding: [0xd4,0x02]
747 aam $2
749 // CHECK: aam
750 // CHECK: encoding: [0xd4,0x0a]
751 aam $0xA
753 // CHECK: aam
754 // CHECK: encoding: [0xd4,0x0a]
757 // CHECK: aas
758 // CHECK: encoding: [0x3f]
761 // CHECK: daa
762 // CHECK: encoding: [0x27]
765 // CHECK: das
766 // CHECK: encoding: [0x2f]
769 // CHECK: retw $31438
770 // CHECK: encoding: [0x66,0xc2,0xce,0x7a]
771 retw $0x7ace
773 // CHECK: lretw $31438
774 // CHECK: encoding: [0x66,0xca,0xce,0x7a]
775 lretw $0x7ace
777 // CHECK: bound %bx, 2(%eax)
778 // CHECK: encoding: [0x66,0x62,0x58,0x02]
779 bound %bx,2(%eax)
781 // CHECK: bound %ecx, 4(%ebx)
782 // CHECK: encoding: [0x62,0x4b,0x04]
783 bound %ecx,4(%ebx)
785 // CHECK: arpl %bx, %bx
786 // CHECK: encoding: [0x63,0xdb]
787 arpl %bx,%bx
789 // CHECK: arpl %bx, 6(%ecx)
790 // CHECK: encoding: [0x63,0x59,0x06]
791 arpl %bx,6(%ecx)
793 // CHECK: lgdtw 4(%eax)
794 // CHECK: encoding: [0x66,0x0f,0x01,0x50,0x04]
795 lgdtw 4(%eax)
797 // CHECK: lgdtl 4(%eax)
798 // CHECK: encoding: [0x0f,0x01,0x50,0x04]
799 lgdt 4(%eax)
801 // CHECK: lgdtl 4(%eax)
802 // CHECK: encoding: [0x0f,0x01,0x50,0x04]
803 lgdtl 4(%eax)
805 // CHECK: lidtw 4(%eax)
806 // CHECK: encoding: [0x66,0x0f,0x01,0x58,0x04]
807 lidtw 4(%eax)
809 // CHECK: lidtl 4(%eax)
810 // CHECK: encoding: [0x0f,0x01,0x58,0x04]
811 lidt 4(%eax)
813 // CHECK: lidtl 4(%eax)
814 // CHECK: encoding: [0x0f,0x01,0x58,0x04]
815 lidtl 4(%eax)
817 // CHECK: sgdtw 4(%eax)
818 // CHECK: encoding: [0x66,0x0f,0x01,0x40,0x04]
819 sgdtw 4(%eax)
821 // CHECK: sgdtl 4(%eax)
822 // CHECK: encoding: [0x0f,0x01,0x40,0x04]
823 sgdt 4(%eax)
825 // CHECK: sgdtl 4(%eax)
826 // CHECK: encoding: [0x0f,0x01,0x40,0x04]
827 sgdtl 4(%eax)
829 // CHECK: sidtw 4(%eax)
830 // CHECK: encoding: [0x66,0x0f,0x01,0x48,0x04]
831 sidtw 4(%eax)
833 // CHECK: sidtl 4(%eax)
834 // CHECK: encoding: [0x0f,0x01,0x48,0x04]
835 sidt 4(%eax)
837 // CHECK: sidtl 4(%eax)
838 // CHECK: encoding: [0x0f,0x01,0x48,0x04]
839 sidtl 4(%eax)
841 // CHECK: fcompi %st(2)
842 // CHECK: encoding: [0xdf,0xf2]
843 fcompi %st(2), %st
845 // CHECK: fcompi %st(2)
846 // CHECK: encoding: [0xdf,0xf2]
847 fcompi %st(2)
849 // CHECK: fcompi
850 // CHECK: encoding: [0xdf,0xf1]
851 fcompi
853 // CHECK: fucompi %st(2)
854 // CHECK: encoding: [0xdf,0xea]
855 fucompi %st(2),%st
857 // CHECK: fucompi %st(2)
858 // CHECK: encoding: [0xdf,0xea]
859 fucompi %st(2)
861 // CHECK: fucompi
862 // CHECK: encoding: [0xdf,0xe9]
863 fucompi
865 // CHECK: fldcw 32493
866 // CHECK: encoding: [0xd9,0x2d,0xed,0x7e,0x00,0x00]
867 fldcww 0x7eed
869 // CHECK: fldcw 32493
870 // CHECK: encoding: [0xd9,0x2d,0xed,0x7e,0x00,0x00]
871 fldcw 0x7eed
873 // CHECK: fnstcw 32493
874 // CHECK: encoding: [0xd9,0x3d,0xed,0x7e,0x00,0x00]
875 fnstcww 0x7eed
877 // CHECK: fnstcw 32493
878 // CHECK: encoding: [0xd9,0x3d,0xed,0x7e,0x00,0x00]
879 fnstcw 0x7eed
881 // CHECK: wait
882 // CHECK: encoding: [0x9b]
883 fstcww 0x7eed
885 // CHECK: wait
886 // CHECK: encoding: [0x9b]
887 fstcw 0x7eed
889 // CHECK: fnstsw 32493
890 // CHECK: encoding: [0xdd,0x3d,0xed,0x7e,0x00,0x00]
891 fnstsww 0x7eed
893 // CHECK: fnstsw 32493
894 // CHECK: encoding: [0xdd,0x3d,0xed,0x7e,0x00,0x00]
895 fnstsw 0x7eed
897 // CHECK: wait
898 // CHECK: encoding: [0x9b]
899 fstsww 0x7eed
901 // CHECK: wait
902 // CHECK: encoding: [0x9b]
903 fstsw 0x7eed
905 // CHECK: verr 32493
906 // CHECK: encoding: [0x0f,0x00,0x25,0xed,0x7e,0x00,0x00]
907 verrw 0x7eed
909 // CHECK: verr 32493
910 // CHECK: encoding: [0x0f,0x00,0x25,0xed,0x7e,0x00,0x00]
911 verr 0x7eed
913 // CHECK: wait
914 // CHECK: encoding: [0x9b]
915 fclex
917 // CHECK: fnclex
918 // CHECK: encoding: [0xdb,0xe2]
919 fnclex
921 // CHECK: ud2
922 // CHECK: encoding: [0x0f,0x0b]
925 // CHECK: ud2
926 // CHECK: encoding: [0x0f,0x0b]
927 ud2a
929 // CHECK: ud1l %edx, %edi
930 // CHECK: encoding: [0x0f,0xb9,0xfa]
931 ud1 %edx, %edi
933 // CHECK: ud1l (%ebx), %ecx
934 // CHECK: encoding: [0x0f,0xb9,0x0b]
935 ud2b (%ebx), %ecx
937 // CHECK: loope 0
938 // CHECK: encoding: [0xe1,A]
939 loopz 0
941 // CHECK: loopne 0
942 // CHECK: encoding: [0xe0,A]
943 loopnz 0
945 // CHECK: outsb (%esi), %dx # encoding: [0x6e]
946 // CHECK: outsb
947 // CHECK: outsb
948 outsb
949 outsb %ds:(%esi), %dx
950 outsb (%esi), %dx
952 // CHECK: outsw (%esi), %dx # encoding: [0x66,0x6f]
953 // CHECK: outsw
954 // CHECK: outsw
955 outsw
956 outsw %ds:(%esi), %dx
957 outsw (%esi), %dx
959 // CHECK: outsl (%esi), %dx # encoding: [0x6f]
960 // CHECK: outsl
961 outsl
962 outsl %ds:(%esi), %dx
963 outsl (%esi), %dx
965 // CHECK: insb %dx, %es:(%edi) # encoding: [0x6c]
966 // CHECK: insb
967 insb
968 insb %dx, %es:(%edi)
970 // CHECK: insw %dx, %es:(%edi) # encoding: [0x66,0x6d]
971 // CHECK: insw
972 insw
973 insw %dx, %es:(%edi)
975 // CHECK: insl %dx, %es:(%edi) # encoding: [0x6d]
976 // CHECK: insl
977 insl
978 insl %dx, %es:(%edi)
980 // CHECK: movsb (%esi), %es:(%edi) # encoding: [0xa4]
981 // CHECK: movsb
982 // CHECK: movsb
983 movsb
984 movsb %ds:(%esi), %es:(%edi)
985 movsb (%esi), %es:(%edi)
987 // CHECK: movsw (%esi), %es:(%edi) # encoding: [0x66,0xa5]
988 // CHECK: movsw
989 // CHECK: movsw
990 movsw
991 movsw %ds:(%esi), %es:(%edi)
992 movsw (%esi), %es:(%edi)
994 // CHECK: movsl (%esi), %es:(%edi) # encoding: [0xa5]
995 // CHECK: movsl
996 // CHECK: movsl
997 movsl
998 movsl %ds:(%esi), %es:(%edi)
999 movsl (%esi), %es:(%edi)
1001 // CHECK: lodsb (%esi), %al # encoding: [0xac]
1002 // CHECK: lodsb
1003 // CHECK: lodsb
1004 // CHECK: lodsb
1005 // CHECK: lodsb
1006 lodsb
1007 lodsb %ds:(%esi), %al
1008 lodsb (%esi), %al
1009 lods %ds:(%esi), %al
1010 lods (%esi), %al
1012 // CHECK: lodsw (%esi), %ax # encoding: [0x66,0xad]
1013 // CHECK: lodsw
1014 // CHECK: lodsw
1015 // CHECK: lodsw
1016 // CHECK: lodsw
1017 lodsw
1018 lodsw %ds:(%esi), %ax
1019 lodsw (%esi), %ax
1020 lods %ds:(%esi), %ax
1021 lods (%esi), %ax
1023 // CHECK: lodsl (%esi), %eax # encoding: [0xad]
1024 // CHECK: lodsl
1025 // CHECK: lodsl
1026 // CHECK: lodsl
1027 // CHECK: lodsl
1028 lodsl
1029 lodsl %ds:(%esi), %eax
1030 lodsl (%esi), %eax
1031 lods %ds:(%esi), %eax
1032 lods (%esi), %eax
1034 // CHECK: stosb %al, %es:(%edi) # encoding: [0xaa]
1035 // CHECK: stosb
1036 // CHECK: stosb
1037 stosb
1038 stosb %al, %es:(%edi)
1039 stos %al, %es:(%edi)
1041 // CHECK: stosw %ax, %es:(%edi) # encoding: [0x66,0xab]
1042 // CHECK: stosw
1043 // CHECK: stosw
1044 stosw
1045 stosw %ax, %es:(%edi)
1046 stos %ax, %es:(%edi)
1048 // CHECK: stosl %eax, %es:(%edi) # encoding: [0xab]
1049 // CHECK: stosl
1050 // CHECK: stosl
1051 stosl
1052 stosl %eax, %es:(%edi)
1053 stos %eax, %es:(%edi)
1055 // CHECK: strw
1056 // CHECK: encoding: [0x66,0x0f,0x00,0xc8]
1057 str %ax
1059 // CHECK: strl
1060 // CHECK: encoding: [0x0f,0x00,0xc8]
1061 str %eax
1064 // PR9378
1065 // CHECK: fsubp
1066 // CHECK: encoding: [0xde,0xe1]
1067 fsubp %st,%st(1)
1069 // PR9164
1070 // CHECK: fsubp %st, %st(2)
1071 // CHECK: encoding: [0xde,0xe2]
1072 fsubp %st, %st(2)
1074 // PR10345
1075 // CHECK: xchgl %eax, %eax
1076 // CHECK: encoding: [0x90]
1077 xchgl %eax, %eax
1079 // CHECK: xchgw %ax, %ax
1080 // CHECK: encoding: [0x66,0x90]
1081 xchgw %ax, %ax
1083 // CHECK: xchgl %ecx, %eax
1084 // CHECK: encoding: [0x91]
1085 xchgl %ecx, %eax
1087 // CHECK: xchgl %ecx, %eax
1088 // CHECK: encoding: [0x91]
1089 xchgl %eax, %ecx
1091 // CHECK: retw
1092 // CHECK: encoding: [0x66,0xc3]
1093 retw
1095 // CHECK: lretw
1096 // CHECK: encoding: [0x66,0xcb]
1097 lretw
1099 // CHECK: data16
1100 // CHECK: encoding: [0x66]
1101 data16
1103 // CHECK: data16
1104 // CHECK: encoding: [0x66]
1105 // CHECK: lgdtl 4(%eax)
1106 // CHECK: encoding: [0x0f,0x01,0x50,0x04]
1107 data16 lgdt 4(%eax)
1109 // CHECK: rdpid %eax
1110 // CHECK: encoding: [0xf3,0x0f,0xc7,0xf8]
1111 rdpid %eax
1113 // CHECK: ptwritel 3735928559(%ebx,%ecx,8)
1114 // CHECK: encoding: [0xf3,0x0f,0xae,0xa4,0xcb,0xef,0xbe,0xad,0xde]
1115 ptwritel 0xdeadbeef(%ebx,%ecx,8)
1117 // CHECK: ptwritel %eax
1118 // CHECK: encoding: [0xf3,0x0f,0xae,0xe0]
1119 ptwritel %eax
1121 // CHECK: jmp foo
1122 // CHECK: encoding: [0xe9,A,A,A,A]
1123 // CHECK: fixup A - offset: 1, value: foo-4, kind: FK_PCRel_4
1124 // CHECK: jmp foo
1125 // CHECK: encoding: [0xe9,A,A,A,A]
1126 // CHECK: fixup A - offset: 1, value: foo-4, kind: FK_PCRel_4
1127 {disp32} jmp foo
1128 jmp.d32 foo
1129 foo:
1131 // CHECK: je foo
1132 // CHECK: encoding: [0x0f,0x84,A,A,A,A]
1133 // CHECK: fixup A - offset: 2, value: foo-4, kind: FK_PCRel_4
1134 // CHECK: je foo
1135 // CHECK: encoding: [0x0f,0x84,A,A,A,A]
1136 // CHECK: fixup A - offset: 2, value: foo-4, kind: FK_PCRel_4
1137 {disp32} je foo
1138 je.d32 foo
1140 // CHECK: ljmpl *%cs:305419896
1141 // CHECK: encoding: [0x2e,0xff,0x2d,0x78,0x56,0x34,0x12]
1142 ljmp %cs:*0x12345678