[llvm-readobj] - Simplify stack-sizes.test test case.
[llvm-complete.git] / test / MC / X86 / x86-32.s
blob5b249a6d0252cca5b3e7d536020a08606fdbd735
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 %eax
49 // CHECK: encoding: [0x0f,0x01,0xd8]
50 vmmcall
51 // CHECK: vmmcall
52 // CHECK: encoding: [0x0f,0x01,0xd9]
53 vmload %eax
54 // CHECK: vmload %eax
55 // CHECK: encoding: [0x0f,0x01,0xda]
56 vmsave %eax
57 // CHECK: vmsave %eax
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 %eax
67 // CHECK: encoding: [0x0f,0x01,0xde]
68 invlpga %eax, %ecx
69 // CHECK: invlpga %eax, %ecx
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 // radr://8017522
456 // CHECK: wait
457 // CHECK: encoding: [0x9b]
458 fwait
460 // rdar://7873482
461 // CHECK: [0x65,0xa1,0x7c,0x00,0x00,0x00]
462 movl %gs:124, %eax
464 // CHECK: [0x65,0xa3,0x7c,0x00,0x00,0x00]
465 movl %eax, %gs:124
467 // CHECK: pushal
468 // CHECK: encoding: [0x60]
469 pusha
471 // CHECK: popal
472 // CHECK: encoding: [0x61]
473 popa
475 // CHECK: pushaw
476 // CHECK: encoding: [0x66,0x60]
477 pushaw
479 // CHECK: popaw
480 // CHECK: encoding: [0x66,0x61]
481 popaw
483 // CHECK: pushal
484 // CHECK: encoding: [0x60]
485 pushal
487 // CHECK: popal
488 // CHECK: encoding: [0x61]
489 popal
491 // CHECK: jmpl *8(%eax)
492 // CHECK: encoding: [0xff,0x60,0x08]
493 jmp *8(%eax)
495 // PR7465
496 // CHECK: lcalll $2, $4660
497 // CHECK: encoding: [0x9a,0x34,0x12,0x00,0x00,0x02,0x00]
498 lcalll $0x2, $0x1234
501 // rdar://8061602
503 jcxz L1
504 // CHECK: jcxz L1
505 // CHECK: encoding: [0x67,0xe3,A]
506 jecxz L1
507 // CHECK: jecxz L1
508 // CHECK: encoding: [0xe3,A]
510 // rdar://8403974
511 iret
512 // CHECK: iretl
513 // CHECK: encoding: [0xcf]
514 iretw
515 // CHECK: iretw
516 // CHECK: encoding: [0x66,0xcf]
517 iretl
518 // CHECK: iretl
519 // CHECK: encoding: [0xcf]
521 // rdar://8403907
522 sysret
523 // CHECK: sysretl
524 // CHECK: encoding: [0x0f,0x07]
525 sysretl
526 // CHECK: sysretl
527 // CHECK: encoding: [0x0f,0x07]
529 // rdar://8018260
530 testl %ecx, -24(%ebp)
531 // CHECK: testl %ecx, -24(%ebp)
532 testl -24(%ebp), %ecx
533 // CHECK: testl %ecx, -24(%ebp)
536 // rdar://8407242
537 push %cs
538 // CHECK: pushl %cs
539 // CHECK: encoding: [0x0e]
540 push %ds
541 // CHECK: pushl %ds
542 // CHECK: encoding: [0x1e]
543 push %ss
544 // CHECK: pushl %ss
545 // CHECK: encoding: [0x16]
546 push %es
547 // CHECK: pushl %es
548 // CHECK: encoding: [0x06]
549 push %fs
550 // CHECK: pushl %fs
551 // CHECK: encoding: [0x0f,0xa0]
552 push %gs
553 // CHECK: pushl %gs
554 // CHECK: encoding: [0x0f,0xa8]
556 pushw %cs
557 // CHECK: pushw %cs
558 // CHECK: encoding: [0x66,0x0e]
559 pushw %ds
560 // CHECK: pushw %ds
561 // CHECK: encoding: [0x66,0x1e]
562 pushw %ss
563 // CHECK: pushw %ss
564 // CHECK: encoding: [0x66,0x16]
565 pushw %es
566 // CHECK: pushw %es
567 // CHECK: encoding: [0x66,0x06]
568 pushw %fs
569 // CHECK: pushw %fs
570 // CHECK: encoding: [0x66,0x0f,0xa0]
571 pushw %gs
572 // CHECK: pushw %gs
573 // CHECK: encoding: [0x66,0x0f,0xa8]
575 pop %ss
576 // CHECK: popl %ss
577 // CHECK: encoding: [0x17]
578 pop %ds
579 // CHECK: popl %ds
580 // CHECK: encoding: [0x1f]
581 pop %es
582 // CHECK: popl %es
583 // CHECK: encoding: [0x07]
585 // rdar://8408129
586 pushfd
587 // CHECK: pushfl
588 popfd
589 // CHECK: popfl
590 pushfl
591 // CHECK: pushfl
592 popfl
593 // CHECK: popfl
596 // rdar://8416805
597 setc %bl
598 setnae %bl
599 setnb %bl
600 setnc %bl
601 setna %bl
602 setnbe %bl
603 setpe %bl
604 setpo %bl
605 setnge %bl
606 setnl %bl
607 setng %bl
608 setnle %bl
610 // PR8686
611 setneb %cl // CHECK: setne %cl
612 setcb %bl // CHECK: setb %bl
613 setnaeb %bl // CHECK: setb %bl
616 // PR8114
618 out %al, (%dx)
619 // CHECK: outb %al, %dx
620 outb %al, (%dx)
621 // CHECK: outb %al, %dx
622 out %ax, (%dx)
623 // CHECK: outw %ax, %dx
624 outw %ax, (%dx)
625 // CHECK: outw %ax, %dx
626 out %eax, (%dx)
627 // CHECK: outl %eax, %dx
628 outl %eax, (%dx)
629 // CHECK: outl %eax, %dx
632 in (%dx), %al
633 // CHECK: inb %dx, %al
634 inb (%dx), %al
635 // CHECK: inb %dx, %al
636 in (%dx), %ax
637 // CHECK: inw %dx, %ax
638 inw (%dx), %ax
639 // CHECK: inw %dx, %ax
640 in (%dx), %eax
641 // CHECK: inl %dx, %eax
642 inl (%dx), %eax
643 // CHECK: inl %dx, %eax
645 //PR15455
647 outsb (%esi), (%dx)
648 // CHECK: outsb (%esi), %dx
649 outsw (%esi), (%dx)
650 // CHECK: outsw (%esi), %dx
651 outsl (%esi), (%dx)
652 // CHECK: outsl (%esi), %dx
654 insb (%dx), %es:(%edi)
655 // CHECK: insb %dx, %es:(%edi)
656 insw (%dx), %es:(%edi)
657 // CHECK: insw %dx, %es:(%edi)
658 insl (%dx), %es:(%edi)
659 // CHECK: insl %dx, %es:(%edi)
661 // CHECK: lcalll $31438, $31438
662 // CHECK: lcalll $31438, $31438
663 // CHECK: ljmpl $31438, $31438
664 // CHECK: ljmpl $31438, $31438
666 calll $0x7ace,$0x7ace
667 lcalll $0x7ace,$0x7ace
668 jmpl $0x7ace,$0x7ace
669 ljmpl $0x7ace,$0x7ace
671 // CHECK: lcallw $31438, $31438
672 // CHECK: lcallw $31438, $31438
673 // CHECK: ljmpw $31438, $31438
674 // CHECK: ljmpw $31438, $31438
676 callw $0x7ace,$0x7ace
677 lcallw $0x7ace,$0x7ace
678 jmpw $0x7ace,$0x7ace
679 ljmpw $0x7ace,$0x7ace
681 // CHECK: lcalll $31438, $31438
682 // CHECK: lcalll $31438, $31438
683 // CHECK: ljmpl $31438, $31438
684 // CHECK: ljmpl $31438, $31438
686 call $0x7ace,$0x7ace
687 lcall $0x7ace,$0x7ace
688 jmp $0x7ace,$0x7ace
689 ljmp $0x7ace,$0x7ace
691 // rdar://8456370
692 // CHECK: calll a
693 calll a
695 // CHECK: incb %al # encoding: [0xfe,0xc0]
696 incb %al
698 // CHECK: incw %ax # encoding: [0x66,0x40]
699 incw %ax
701 // CHECK: incl %eax # encoding: [0x40]
702 incl %eax
704 // CHECK: decb %al # encoding: [0xfe,0xc8]
705 decb %al
707 // CHECK: decw %ax # encoding: [0x66,0x48]
708 decw %ax
710 // CHECK: decl %eax # encoding: [0x48]
711 decl %eax
713 // CHECK: pshufw $14, %mm4, %mm0 # encoding: [0x0f,0x70,0xc4,0x0e]
714 pshufw $14, %mm4, %mm0
716 // CHECK: pshufw $90, %mm4, %mm0 # encoding: [0x0f,0x70,0xc4,0x5a]
717 // PR8288
718 pshufw $90, %mm4, %mm0
720 // rdar://8416805
721 // CHECK: aaa
722 // CHECK: encoding: [0x37]
725 // CHECK: aad $1
726 // CHECK: encoding: [0xd5,0x01]
727 aad $1
729 // CHECK: aad
730 // CHECK: encoding: [0xd5,0x0a]
731 aad $0xA
733 // CHECK: aad
734 // CHECK: encoding: [0xd5,0x0a]
737 // CHECK: aam $2
738 // CHECK: encoding: [0xd4,0x02]
739 aam $2
741 // CHECK: aam
742 // CHECK: encoding: [0xd4,0x0a]
743 aam $0xA
745 // CHECK: aam
746 // CHECK: encoding: [0xd4,0x0a]
749 // CHECK: aas
750 // CHECK: encoding: [0x3f]
753 // CHECK: daa
754 // CHECK: encoding: [0x27]
757 // CHECK: das
758 // CHECK: encoding: [0x2f]
761 // CHECK: retw $31438
762 // CHECK: encoding: [0x66,0xc2,0xce,0x7a]
763 retw $0x7ace
765 // CHECK: lretw $31438
766 // CHECK: encoding: [0x66,0xca,0xce,0x7a]
767 lretw $0x7ace
769 // CHECK: bound %bx, 2(%eax)
770 // CHECK: encoding: [0x66,0x62,0x58,0x02]
771 bound %bx,2(%eax)
773 // CHECK: bound %ecx, 4(%ebx)
774 // CHECK: encoding: [0x62,0x4b,0x04]
775 bound %ecx,4(%ebx)
777 // CHECK: arpl %bx, %bx
778 // CHECK: encoding: [0x63,0xdb]
779 arpl %bx,%bx
781 // CHECK: arpl %bx, 6(%ecx)
782 // CHECK: encoding: [0x63,0x59,0x06]
783 arpl %bx,6(%ecx)
785 // CHECK: lgdtw 4(%eax)
786 // CHECK: encoding: [0x66,0x0f,0x01,0x50,0x04]
787 lgdtw 4(%eax)
789 // CHECK: lgdtl 4(%eax)
790 // CHECK: encoding: [0x0f,0x01,0x50,0x04]
791 lgdt 4(%eax)
793 // CHECK: lgdtl 4(%eax)
794 // CHECK: encoding: [0x0f,0x01,0x50,0x04]
795 lgdtl 4(%eax)
797 // CHECK: lidtw 4(%eax)
798 // CHECK: encoding: [0x66,0x0f,0x01,0x58,0x04]
799 lidtw 4(%eax)
801 // CHECK: lidtl 4(%eax)
802 // CHECK: encoding: [0x0f,0x01,0x58,0x04]
803 lidt 4(%eax)
805 // CHECK: lidtl 4(%eax)
806 // CHECK: encoding: [0x0f,0x01,0x58,0x04]
807 lidtl 4(%eax)
809 // CHECK: sgdtw 4(%eax)
810 // CHECK: encoding: [0x66,0x0f,0x01,0x40,0x04]
811 sgdtw 4(%eax)
813 // CHECK: sgdtl 4(%eax)
814 // CHECK: encoding: [0x0f,0x01,0x40,0x04]
815 sgdt 4(%eax)
817 // CHECK: sgdtl 4(%eax)
818 // CHECK: encoding: [0x0f,0x01,0x40,0x04]
819 sgdtl 4(%eax)
821 // CHECK: sidtw 4(%eax)
822 // CHECK: encoding: [0x66,0x0f,0x01,0x48,0x04]
823 sidtw 4(%eax)
825 // CHECK: sidtl 4(%eax)
826 // CHECK: encoding: [0x0f,0x01,0x48,0x04]
827 sidt 4(%eax)
829 // CHECK: sidtl 4(%eax)
830 // CHECK: encoding: [0x0f,0x01,0x48,0x04]
831 sidtl 4(%eax)
833 // CHECK: fcompi %st(2)
834 // CHECK: encoding: [0xdf,0xf2]
835 fcompi %st(2), %st
837 // CHECK: fcompi %st(2)
838 // CHECK: encoding: [0xdf,0xf2]
839 fcompi %st(2)
841 // CHECK: fcompi
842 // CHECK: encoding: [0xdf,0xf1]
843 fcompi
845 // CHECK: fucompi %st(2)
846 // CHECK: encoding: [0xdf,0xea]
847 fucompi %st(2),%st
849 // CHECK: fucompi %st(2)
850 // CHECK: encoding: [0xdf,0xea]
851 fucompi %st(2)
853 // CHECK: fucompi
854 // CHECK: encoding: [0xdf,0xe9]
855 fucompi
857 // CHECK: fldcw 32493
858 // CHECK: encoding: [0xd9,0x2d,0xed,0x7e,0x00,0x00]
859 fldcww 0x7eed
861 // CHECK: fldcw 32493
862 // CHECK: encoding: [0xd9,0x2d,0xed,0x7e,0x00,0x00]
863 fldcw 0x7eed
865 // CHECK: fnstcw 32493
866 // CHECK: encoding: [0xd9,0x3d,0xed,0x7e,0x00,0x00]
867 fnstcww 0x7eed
869 // CHECK: fnstcw 32493
870 // CHECK: encoding: [0xd9,0x3d,0xed,0x7e,0x00,0x00]
871 fnstcw 0x7eed
873 // CHECK: wait
874 // CHECK: encoding: [0x9b]
875 fstcww 0x7eed
877 // CHECK: wait
878 // CHECK: encoding: [0x9b]
879 fstcw 0x7eed
881 // CHECK: fnstsw 32493
882 // CHECK: encoding: [0xdd,0x3d,0xed,0x7e,0x00,0x00]
883 fnstsww 0x7eed
885 // CHECK: fnstsw 32493
886 // CHECK: encoding: [0xdd,0x3d,0xed,0x7e,0x00,0x00]
887 fnstsw 0x7eed
889 // CHECK: wait
890 // CHECK: encoding: [0x9b]
891 fstsww 0x7eed
893 // CHECK: wait
894 // CHECK: encoding: [0x9b]
895 fstsw 0x7eed
897 // CHECK: verr 32493
898 // CHECK: encoding: [0x0f,0x00,0x25,0xed,0x7e,0x00,0x00]
899 verrw 0x7eed
901 // CHECK: verr 32493
902 // CHECK: encoding: [0x0f,0x00,0x25,0xed,0x7e,0x00,0x00]
903 verr 0x7eed
905 // CHECK: wait
906 // CHECK: encoding: [0x9b]
907 fclex
909 // CHECK: fnclex
910 // CHECK: encoding: [0xdb,0xe2]
911 fnclex
913 // CHECK: ud2
914 // CHECK: encoding: [0x0f,0x0b]
917 // CHECK: ud2
918 // CHECK: encoding: [0x0f,0x0b]
919 ud2a
921 // CHECK: ud2b
922 // CHECK: encoding: [0x0f,0xb9]
923 ud2b
925 // CHECK: loope 0
926 // CHECK: encoding: [0xe1,A]
927 loopz 0
929 // CHECK: loopne 0
930 // CHECK: encoding: [0xe0,A]
931 loopnz 0
933 // CHECK: outsb (%esi), %dx # encoding: [0x6e]
934 // CHECK: outsb
935 // CHECK: outsb
936 outsb
937 outsb %ds:(%esi), %dx
938 outsb (%esi), %dx
940 // CHECK: outsw (%esi), %dx # encoding: [0x66,0x6f]
941 // CHECK: outsw
942 // CHECK: outsw
943 outsw
944 outsw %ds:(%esi), %dx
945 outsw (%esi), %dx
947 // CHECK: outsl (%esi), %dx # encoding: [0x6f]
948 // CHECK: outsl
949 outsl
950 outsl %ds:(%esi), %dx
951 outsl (%esi), %dx
953 // CHECK: insb %dx, %es:(%edi) # encoding: [0x6c]
954 // CHECK: insb
955 insb
956 insb %dx, %es:(%edi)
958 // CHECK: insw %dx, %es:(%edi) # encoding: [0x66,0x6d]
959 // CHECK: insw
960 insw
961 insw %dx, %es:(%edi)
963 // CHECK: insl %dx, %es:(%edi) # encoding: [0x6d]
964 // CHECK: insl
965 insl
966 insl %dx, %es:(%edi)
968 // CHECK: movsb (%esi), %es:(%edi) # encoding: [0xa4]
969 // CHECK: movsb
970 // CHECK: movsb
971 movsb
972 movsb %ds:(%esi), %es:(%edi)
973 movsb (%esi), %es:(%edi)
975 // CHECK: movsw (%esi), %es:(%edi) # encoding: [0x66,0xa5]
976 // CHECK: movsw
977 // CHECK: movsw
978 movsw
979 movsw %ds:(%esi), %es:(%edi)
980 movsw (%esi), %es:(%edi)
982 // CHECK: movsl (%esi), %es:(%edi) # encoding: [0xa5]
983 // CHECK: movsl
984 // CHECK: movsl
985 movsl
986 movsl %ds:(%esi), %es:(%edi)
987 movsl (%esi), %es:(%edi)
989 // CHECK: lodsb (%esi), %al # encoding: [0xac]
990 // CHECK: lodsb
991 // CHECK: lodsb
992 // CHECK: lodsb
993 // CHECK: lodsb
994 lodsb
995 lodsb %ds:(%esi), %al
996 lodsb (%esi), %al
997 lods %ds:(%esi), %al
998 lods (%esi), %al
1000 // CHECK: lodsw (%esi), %ax # encoding: [0x66,0xad]
1001 // CHECK: lodsw
1002 // CHECK: lodsw
1003 // CHECK: lodsw
1004 // CHECK: lodsw
1005 lodsw
1006 lodsw %ds:(%esi), %ax
1007 lodsw (%esi), %ax
1008 lods %ds:(%esi), %ax
1009 lods (%esi), %ax
1011 // CHECK: lodsl (%esi), %eax # encoding: [0xad]
1012 // CHECK: lodsl
1013 // CHECK: lodsl
1014 // CHECK: lodsl
1015 // CHECK: lodsl
1016 lodsl
1017 lodsl %ds:(%esi), %eax
1018 lodsl (%esi), %eax
1019 lods %ds:(%esi), %eax
1020 lods (%esi), %eax
1022 // CHECK: stosb %al, %es:(%edi) # encoding: [0xaa]
1023 // CHECK: stosb
1024 // CHECK: stosb
1025 stosb
1026 stosb %al, %es:(%edi)
1027 stos %al, %es:(%edi)
1029 // CHECK: stosw %ax, %es:(%edi) # encoding: [0x66,0xab]
1030 // CHECK: stosw
1031 // CHECK: stosw
1032 stosw
1033 stosw %ax, %es:(%edi)
1034 stos %ax, %es:(%edi)
1036 // CHECK: stosl %eax, %es:(%edi) # encoding: [0xab]
1037 // CHECK: stosl
1038 // CHECK: stosl
1039 stosl
1040 stosl %eax, %es:(%edi)
1041 stos %eax, %es:(%edi)
1043 // CHECK: strw
1044 // CHECK: encoding: [0x66,0x0f,0x00,0xc8]
1045 str %ax
1047 // CHECK: strl
1048 // CHECK: encoding: [0x0f,0x00,0xc8]
1049 str %eax
1052 // PR9378
1053 // CHECK: fsubp
1054 // CHECK: encoding: [0xde,0xe1]
1055 fsubp %st,%st(1)
1057 // PR9164
1058 // CHECK: fsubp %st, %st(2)
1059 // CHECK: encoding: [0xde,0xe2]
1060 fsubp %st, %st(2)
1062 // PR10345
1063 // CHECK: xchgl %eax, %eax
1064 // CHECK: encoding: [0x90]
1065 xchgl %eax, %eax
1067 // CHECK: xchgw %ax, %ax
1068 // CHECK: encoding: [0x66,0x90]
1069 xchgw %ax, %ax
1071 // CHECK: xchgl %ecx, %eax
1072 // CHECK: encoding: [0x91]
1073 xchgl %ecx, %eax
1075 // CHECK: xchgl %ecx, %eax
1076 // CHECK: encoding: [0x91]
1077 xchgl %eax, %ecx
1079 // CHECK: retw
1080 // CHECK: encoding: [0x66,0xc3]
1081 retw
1083 // CHECK: lretw
1084 // CHECK: encoding: [0x66,0xcb]
1085 lretw
1087 // CHECK: data16
1088 // CHECK: encoding: [0x66]
1089 data16
1091 // CHECK: data16
1092 // CHECK: encoding: [0x66]
1093 // CHECK: lgdtl 4(%eax)
1094 // CHECK: encoding: [0x0f,0x01,0x50,0x04]
1095 data16 lgdt 4(%eax)
1097 // CHECK: rdpid %eax
1098 // CHECK: encoding: [0xf3,0x0f,0xc7,0xf8]
1099 rdpid %eax
1101 // CHECK: ptwritel 3735928559(%ebx,%ecx,8)
1102 // CHECK: encoding: [0xf3,0x0f,0xae,0xa4,0xcb,0xef,0xbe,0xad,0xde]
1103 ptwritel 0xdeadbeef(%ebx,%ecx,8)
1105 // CHECK: ptwritel %eax
1106 // CHECK: encoding: [0xf3,0x0f,0xae,0xe0]
1107 ptwritel %eax