1 // RUN: llvm-mc -triple x86_64-unknown-unknown -show-encoding %s > %t 2> %t.err
2 // RUN: FileCheck < %t %s
3 // RUN: FileCheck --check-prefix=CHECK-STDERR < %t.err %s
7 // CHECK: encoding: [0x0f,0x01,0xc8]
8 monitor %rax, %rcx, %rdx
10 // CHECK: encoding: [0x0f,0x01,0xc8]
13 // CHECK: encoding: [0x0f,0x01,0xc9]
16 // CHECK: encoding: [0x0f,0x01,0xc9]
20 // CHECK: addl $0, %eax
22 // CHECK: addb $255, %al
24 // CHECK: orq %rax, %rdx
26 // CHECK: shlq $3, %rax
30 // CHECK: subb %al, %al
33 // CHECK: addl $24, %eax
36 // CHECK: movl %eax, 10(%ebp)
38 // CHECK: movl %eax, 10(%ebp,%ebx)
39 movl %eax, 10(%ebp, %ebx)
40 // CHECK: movl %eax, 10(%ebp,%ebx,4)
41 movl %eax, 10(%ebp, %ebx, 4)
42 // CHECK: movl %eax, 10(,%ebx,4)
43 movl %eax, 10(, %ebx, 4)
45 // CHECK: movl 0, %eax
47 // CHECK: movl $0, %eax
56 // FIXME: Check that this matches SUB32ri8
57 // CHECK: subl $1, %eax
60 // FIXME: Check that this matches SUB32ri8
61 // CHECK: subl $-1, %eax
64 // FIXME: Check that this matches SUB32ri
65 // CHECK: subl $256, %eax
68 // FIXME: Check that this matches XOR64ri8
69 // CHECK: xorq $1, %rax
72 // FIXME: Check that this matches XOR64ri32
73 // CHECK: xorq $256, %rax
76 // FIXME: Check that this matches SUB8rr
77 // CHECK: subb %al, %bl
80 // FIXME: Check that this matches SUB16rr
81 // CHECK: subw %ax, %bx
84 // FIXME: Check that this matches SUB32rr
85 // CHECK: subl %eax, %ebx
88 // FIXME: Check that this matches the correct instruction.
92 // FIXME: Check that this matches the correct instruction.
93 // CHECK: shldl %cl, %eax, %ebx
96 // CHECK: shll $2, %eax
99 // CHECK: shll $2, %eax
116 smovb // CHECK: movsb
117 smovw // CHECK: movsw
118 smovl // CHECK: movsl
119 smovq // CHECK: movsq
134 // NOTE: repz and repe have the same opcode as rep
139 // NOTE: repnz has the same opcode as repne
144 // NOTE: repe and repz have the same opcode as rep
154 // CHECK: cmpxchgb %al, (%ebx)
155 lock;cmpxchgb %al, 0(%ebx)
158 // CHECK: movb (%eax), %al
162 // CHECK: movb (%eax), %al
166 // CHECK: movb (%eax), %al
170 // CHECK: movb (%eax), %al
174 // CHECK: movb (%eax), %al
178 // CHECK: movb (%eax), %al
181 // CHECK: fadd %st(0)
182 // CHECK: fadd %st(1)
183 // CHECK: fadd %st(7)
189 // CHECK: leal 0, %eax
192 // rdar://7986634 - Insensitivity on opcodes.
196 // rdar://8735979 - int $3 -> int3
201 // Allow scale factor without index register.
202 // CHECK: movaps %xmm3, (%esi)
203 // CHECK-STDERR: warning: scale factor without index register is ignored
204 movaps %xmm3, (%esi, 2)
206 // CHECK: imull $12, %eax
209 // CHECK: imull %ecx, %eax
214 // CHECK: outb %al, $161
216 // CHECK: outw %ax, $128
218 // CHECK: inb $161, %al
227 // CHECK: encoding: [0x6a,0x01]
229 // CHECK: encoding: [0x68,0x47,0xf4,0x10,0x00]
236 // CHECK: cmovnew %bx, %ax
238 // CHECK: cmovneq %rbx, %rax
243 // CHECK: inb $127, %al
244 // CHECK: inw %dx, %ax
245 // CHECK: outb %al, $127
246 // CHECK: outw %ax, %dx
247 // CHECK: inl %dx, %eax
256 // CHECK: outb %al, %dx
257 // CHECK: outb %al, %dx
258 // CHECK: outw %ax, %dx
259 // CHECK: outw %ax, %dx
260 // CHECK: outl %eax, %dx
261 // CHECK: outl %eax, %dx
270 // CHECK: inb %dx, %al
271 // CHECK: inb %dx, %al
272 // CHECK: inw %dx, %ax
273 // CHECK: inw %dx, %ax
274 // CHECK: inl %dx, %eax
275 // CHECK: inl %dx, %eax
286 // CHECK: fxch %st(1)
287 // CHECK: fucom %st(1)
288 // CHECK: fucomp %st(1)
289 // CHECK: faddp %st(1)
290 // CHECK: faddp %st(0)
291 // CHECK: fsubp %st(1)
292 // CHECK: fsubrp %st(1)
293 // CHECK: fmulp %st(1)
294 // CHECK: fdivp %st(1)
295 // CHECK: fdivrp %st(1)
308 // CHECK: fcomi %st(1)
309 // CHECK: fcomi %st(2)
310 // CHECK: fucomi %st(1)
311 // CHECK: fucomi %st(2)
312 // CHECK: fucomi %st(2)
332 // CHECK: rcll 3735928559(%ebx,%ecx,8)
334 // CHECK: rcrl 305419896
336 rcll 0xdeadbeef(%ebx,%ecx,8)
340 rclb %bl // CHECK: rclb %bl # encoding: [0xd0,0xd3]
341 rclb $1, %bl // CHECK: rclb %bl # encoding: [0xd0,0xd3]
342 rclb $2, %bl // CHECK: rclb $2, %bl # encoding: [0xc0,0xd3,0x02]
346 // CHECK: shldw %cl, %bx, %dx
347 // CHECK: shldw %cl, %bx, %dx
348 // CHECK: shldw $1, %bx, %dx
349 // CHECK: shldw %cl, %bx, (%rax)
350 // CHECK: shldw %cl, %bx, (%rax)
351 // CHECK: shrdw %cl, %bx, %dx
352 // CHECK: shrdw %cl, %bx, %dx
353 // CHECK: shrdw $1, %bx, %dx
354 // CHECK: shrdw %cl, %bx, (%rax)
355 // CHECK: shrdw %cl, %bx, (%rax)
361 shld %cl, %bx, (%rax)
366 shrd %cl, %bx, (%rax)
369 // CHECK: encoding: [0x0f,0x00,0xc1]
371 // CHECK: encoding: [0x66,0x0f,0x00,0xc1]
376 // CHECK: lcalll *3135175374
377 // CHECK: ljmpl *3135175374
383 // CHECK: enter $31438, $0
384 // CHECK: encoding: [0xc8,0xce,0x7a,0x00]
385 // CHECK: enter $31438, $1
386 // CHECK: encoding: [0xc8,0xce,0x7a,0x01]
387 // CHECK: enter $31438, $127
388 // CHECK: encoding: [0xc8,0xce,0x7a,0x7f]
395 // CHECK: movw %cs, %ax
399 fcmovb %st(1), %st(0) // CHECK: fcmovb %st(1), %st(0)
400 fcmove %st(1), %st(0) // CHECK: fcmove %st(1), %st(0)
401 fcmovbe %st(1), %st(0) // CHECK: fcmovbe %st(1), %st(0)
402 fcmovu %st(1), %st(0) // CHECK: fcmovu %st(1), %st(0)
404 fcmovnb %st(1), %st(0) // CHECK: fcmovnb %st(1), %st(0)
405 fcmovne %st(1), %st(0) // CHECK: fcmovne %st(1), %st(0)
406 fcmovnbe %st(1), %st(0) // CHECK: fcmovnbe %st(1), %st(0)
407 fcmovnu %st(1), %st(0) // CHECK: fcmovnu %st(1), %st(0)
409 fcmovnae %st(1), %st(0) // CHECK: fcmovb %st(1), %st(0)
410 fcmovna %st(1), %st(0) // CHECK: fcmovbe %st(1), %st(0)
412 fcmovae %st(1), %st(0) // CHECK: fcmovnb %st(1), %st(0)
413 fcmova %st(1), %st(0) // CHECK: fcmovnbe %st(1), %st(0)
416 .byte 88 + 1 & 15 // CHECK: .byte 9
420 // CHECK: movq %rdx, %cr0
421 // CHECK: encoding: [0x0f,0x22,0xc2]
423 // CHECK: movq %rdx, %cr4
424 // CHECK: encoding: [0x0f,0x22,0xe2]
426 // CHECK: movq %rdx, %cr8
427 // CHECK: encoding: [0x44,0x0f,0x22,0xc2]
429 // CHECK: movq %rdx, %cr15
430 // CHECK: encoding: [0x44,0x0f,0x22,0xfa]
432 // rdar://8456371 - Handle commutable instructions written backward.
433 // CHECK: faddp %st(1)
434 // CHECK: fmulp %st(2)
438 // rdar://8468087 - Encode these accurately, they are not synonyms.
439 // CHECK: fmul %st(0), %st(1)
440 // CHECK: encoding: [0xdc,0xc9]
441 // CHECK: fmul %st(1)
442 // CHECK: encoding: [0xd8,0xc9]
446 // CHECK: fadd %st(0), %st(1)
447 // CHECK: encoding: [0xdc,0xc1]
448 // CHECK: fadd %st(1)
449 // CHECK: encoding: [0xd8,0xc1]
455 // CHECK: xorb %al, %al
456 // CHECK: encoding: [0x30,0xc0]
457 // CHECK: xorw %di, %di
458 // CHECK: encoding: [0x66,0x31,0xff]
459 // CHECK: xorl %esi, %esi
460 // CHECK: encoding: [0x31,0xf6]
461 // CHECK: xorq %rsi, %rsi
462 // CHECK: encoding: [0x48,0x31,0xf6]
480 // rdar://8456378 and PR7557 - fstsw
486 // CHECK: fnstsw (%rax)
491 // CHECK: fnstcw (%rsp)
496 // CHECK: fnstcw (%rsp)
505 // CHECK: fnsave 32493
508 // rdar://8456382 - cvtsd2si support.
510 // CHECK: cvtsd2si %xmm1, %rax
511 // CHECK: encoding: [0xf2,0x48,0x0f,0x2d,0xc1]
513 // CHECK: cvtsd2si %xmm1, %eax
514 // CHECK: encoding: [0xf2,0x0f,0x2d,0xc1]
516 cvtsd2siq %xmm0, %rax // CHECK: cvtsd2si %xmm0, %rax
517 cvtsd2sil %xmm0, %eax // CHECK: cvtsd2si %xmm0, %eax
518 cvtsd2si %xmm0, %rax // CHECK: cvtsd2si %xmm0, %rax
521 cvttpd2dq %xmm1, %xmm0 // CHECK: cvttpd2dq %xmm1, %xmm0
522 cvttpd2dq (%rax), %xmm0 // CHECK: cvttpd2dq (%rax), %xmm0
524 cvttps2dq %xmm1, %xmm0 // CHECK: cvttps2dq %xmm1, %xmm0
525 cvttps2dq (%rax), %xmm0 // CHECK: cvttps2dq (%rax), %xmm0
527 // rdar://8456376 - llvm-mc rejects 'roundss'
528 roundss $0xE, %xmm0, %xmm0 // CHECK: encoding: [0x66,0x0f,0x3a,0x0a,0xc0,0x0e]
529 roundps $0xE, %xmm0, %xmm0 // CHECK: encoding: [0x66,0x0f,0x3a,0x08,0xc0,0x0e]
530 roundsd $0xE, %xmm0, %xmm0 // CHECK: encoding: [0x66,0x0f,0x3a,0x0b,0xc0,0x0e]
531 roundpd $0xE, %xmm0, %xmm0 // CHECK: encoding: [0x66,0x0f,0x3a,0x09,0xc0,0x0e]
534 // rdar://8482675 - 32-bit mem operand support in 64-bit mode (0x67 prefix)
536 // CHECK: leal 8(%eax), %esi
537 // CHECK: encoding: [0x67,0x8d,0x70,0x08]
539 // CHECK: leaq 8(%eax), %rsi
540 // CHECK: encoding: [0x67,0x48,0x8d,0x70,0x08]
542 // CHECK: leaq 8(%rax), %rsi
543 // CHECK: encoding: [0x48,0x8d,0x70,0x08]
546 cvttpd2dq 0xdeadbeef(%ebx,%ecx,8),%xmm5
547 // CHECK: cvttpd2dq 3735928559(%ebx,%ecx,8), %xmm5
548 // CHECK: encoding: [0x67,0x66,0x0f,0xe6,0xac,0xcb,0xef,0xbe,0xad,0xde]
550 // rdar://8490728 - llvm-mc rejects 'movmskpd'
552 // CHECK: movmskpd %xmm6, %eax
553 // CHECK: encoding: [0x66,0x0f,0x50,0xc6]
555 // CHECK: movmskpd %xmm6, %eax
556 // CHECK: encoding: [0x66,0x0f,0x50,0xc6]
558 // rdar://8491845 - Gas supports commuted forms of non-commutable instructions.
559 fdivrp %st(0), %st(1) // CHECK: encoding: [0xde,0xf9]
560 fdivrp %st(1), %st(0) // CHECK: encoding: [0xde,0xf9]
562 fsubrp %ST(0), %ST(1) // CHECK: encoding: [0xde,0xe9]
563 fsubrp %ST(1), %ST(0) // CHECK: encoding: [0xde,0xe9]
566 fdivp %st(0), %st(1) // CHECK: encoding: [0xde,0xf1]
567 fdivp %st(1), %st(0) // CHECK: encoding: [0xde,0xf1]
571 // CHECK: movl foo(%rip), %eax
572 // CHECK: encoding: [0x8b,0x05,A,A,A,A]
573 // CHECK: fixup A - offset: 2, value: foo-4, kind: reloc_riprel_4byte
576 // CHECK: movb $12, foo(%rip)
577 // CHECK: encoding: [0xc6,0x05,A,A,A,A,0x0c]
578 // CHECK: fixup A - offset: 2, value: foo-5, kind: reloc_riprel_4byte
581 // CHECK: movw $12, foo(%rip)
582 // CHECK: encoding: [0x66,0xc7,0x05,A,A,A,A,0x0c,0x00]
583 // CHECK: fixup A - offset: 3, value: foo-6, kind: reloc_riprel_4byte
586 // CHECK: movl $12, foo(%rip)
587 // CHECK: encoding: [0xc7,0x05,A,A,A,A,0x0c,0x00,0x00,0x00]
588 // CHECK: fixup A - offset: 2, value: foo-8, kind: reloc_riprel_4byte
591 // CHECK: movq $12, foo(%rip)
592 // CHECK: encoding: [0x48,0xc7,0x05,A,A,A,A,0x0c,0x00,0x00,0x00]
593 // CHECK: fixup A - offset: 3, value: foo-8, kind: reloc_riprel_4byte
595 // CHECK: addq $-424, %rax
596 // CHECK: encoding: [0x48,0x05,0x58,0xfe,0xff,0xff]
600 // CHECK: movq _foo@GOTPCREL(%rip), %rax
601 // CHECK: encoding: [0x48,0x8b,0x05,A,A,A,A]
602 // CHECK: fixup A - offset: 3, value: _foo@GOTPCREL-4, kind: reloc_riprel_4byte_movq_load
603 movq _foo@GOTPCREL(%rip), %rax
605 // CHECK: movq _foo@GOTPCREL(%rip), %r14
606 // CHECK: encoding: [0x4c,0x8b,0x35,A,A,A,A]
607 // CHECK: fixup A - offset: 3, value: _foo@GOTPCREL-4, kind: reloc_riprel_4byte_movq_load
608 movq _foo@GOTPCREL(%rip), %r14
611 // CHECK: movq (%r13,%rax,8), %r13
612 // CHECK: encoding: [0x4d,0x8b,0x6c,0xc5,0x00]
613 movq 0x00(%r13,%rax,8),%r13
615 // CHECK: testq %rax, %rbx
616 // CHECK: encoding: [0x48,0x85,0xc3]
619 // CHECK: cmpq %rbx, %r14
620 // CHECK: encoding: [0x49,0x39,0xde]
627 // CHECK: encoding: [0x48,0xa5]
631 // CHECK: encoding: [0xa5]
635 // CHECK: encoding: [0x48,0xab]
638 // CHECK: encoding: [0xab]
641 // Not moffset forms of moves, they are x86-32 only! rdar://7947184
642 movb 0, %al // CHECK: movb 0, %al # encoding: [0x8a,0x04,0x25,0x00,0x00,0x00,0x00]
643 movw 0, %ax // CHECK: movw 0, %ax # encoding: [0x66,0x8b,0x04,0x25,0x00,0x00,0x00,0x00]
644 movl 0, %eax // CHECK: movl 0, %eax # encoding: [0x8b,0x04,0x25,0x00,0x00,0x00,0x00]
646 // CHECK: pushfq # encoding: [0x9c]
648 // CHECK: pushfq # encoding: [0x9c]
650 // CHECK: popfq # encoding: [0x9d]
652 // CHECK: popfq # encoding: [0x9d]
655 // CHECK: movabsq $-281474976710654, %rax
656 // CHECK: encoding: [0x48,0xb8,0x02,0x00,0x00,0x00,0x00,0x00,0xff,0xff]
657 movabsq $0xFFFF000000000002, %rax
659 // CHECK: movabsq $-281474976710654, %rax
660 // CHECK: encoding: [0x48,0xb8,0x02,0x00,0x00,0x00,0x00,0x00,0xff,0xff]
661 movq $0xFFFF000000000002, %rax
663 // CHECK: movq $-65536, %rax
664 // CHECK: encoding: [0x48,0xc7,0xc0,0x00,0x00,0xff,0xff]
665 movq $0xFFFFFFFFFFFF0000, %rax
667 // CHECK: movq $-256, %rax
668 // CHECK: encoding: [0x48,0xc7,0xc0,0x00,0xff,0xff,0xff]
669 movq $0xFFFFFFFFFFFFFF00, %rax
671 // CHECK: movq $10, %rax
672 // CHECK: encoding: [0x48,0xc7,0xc0,0x0a,0x00,0x00,0x00]
675 // CHECK: movabsb -6066930261531658096, %al
676 // CHECK: encoding: [0xa0,0x90,0x78,0x56,0x34,0x12,0xef,0xcd,0xab]
677 movabsb 0xabcdef1234567890,%al
679 // CHECK: movabsw -6066930261531658096, %ax
680 // CHECK: encoding: [0x66,0xa1,0x90,0x78,0x56,0x34,0x12,0xef,0xcd,0xab]
681 movabsw 0xabcdef1234567890,%ax
683 // CHECK: movabsl -6066930261531658096, %eax
684 // CHECK: encoding: [0xa1,0x90,0x78,0x56,0x34,0x12,0xef,0xcd,0xab]
685 movabsl 0xabcdef1234567890,%eax
687 // CHECK: movabsq -6066930261531658096, %rax
688 // CHECK: encoding: [0x48,0xa1,0x90,0x78,0x56,0x34,0x12,0xef,0xcd,0xab]
689 movabsq 0xabcdef1234567890, %rax
691 // CHECK: movabsb %al, -6066930261531658096
692 // CHECK: encoding: [0xa2,0x90,0x78,0x56,0x34,0x12,0xef,0xcd,0xab]
693 movabsb %al,0xabcdef1234567890
695 // CHECK: movabsw %ax, -6066930261531658096
696 // CHECK: encoding: [0x66,0xa3,0x90,0x78,0x56,0x34,0x12,0xef,0xcd,0xab]
697 movabsw %ax,0xabcdef1234567890
699 // CHECK: movabsl %eax, -6066930261531658096
700 // CHECK: encoding: [0xa3,0x90,0x78,0x56,0x34,0x12,0xef,0xcd,0xab]
701 movabsl %eax,0xabcdef1234567890
703 // CHECK: movabsq %rax, -6066930261531658096
704 // CHECK: encoding: [0x48,0xa3,0x90,0x78,0x56,0x34,0x12,0xef,0xcd,0xab]
705 movabsq %rax,0xabcdef1234567890
710 // CHECK: encoding: [0xc3]
714 // CHECK: encoding: [0x0f,0x94,0xc0]
718 // CHECK: encoding: [0x0f,0x95,0xc0]
722 // CHECK: encoding: [0x74,A]
726 // CHECK: encoding: [0x75,A]
730 btl $1, 0 // CHECK: btl $1, 0 # encoding: [0x0f,0xba,0x24,0x25,0x00,0x00,0x00,0x00,0x01]
731 bt $1, 0 // CHECK: btl $1, 0 # encoding: [0x0f,0xba,0x24,0x25,0x00,0x00,0x00,0x00,0x01]
735 // CHECK: btq $1, %rdx
736 // CHECK: encoding: [0x48,0x0f,0xba,0xe2,0x01]
739 // CHECK: movzbl %al, %esi
740 // CHECK: encoding: [0x0f,0xb6,0xf0]
743 // CHECK: movzbq %al, %rsi
744 // CHECK: encoding: [0x48,0x0f,0xb6,0xf0]
747 // CHECK: movsbw %al, %ax
748 // CHECK: encoding: [0x66,0x0f,0xbe,0xc0]
751 // CHECK: movsbl %al, %eax
752 // CHECK: encoding: [0x0f,0xbe,0xc0]
755 // CHECK: movswl %ax, %eax
756 // CHECK: encoding: [0x0f,0xbf,0xc0]
759 // CHECK: movsbq %bl, %rax
760 // CHECK: encoding: [0x48,0x0f,0xbe,0xc3]
763 // CHECK: movswq %cx, %rax
764 // CHECK: encoding: [0x48,0x0f,0xbf,0xc1]
767 // CHECK: movslq %edi, %rax
768 // CHECK: encoding: [0x48,0x63,0xc7]
771 // CHECK: movzbw %al, %ax
772 // CHECK: encoding: [0x66,0x0f,0xb6,0xc0]
775 // CHECK: movzbl %al, %eax
776 // CHECK: encoding: [0x0f,0xb6,0xc0]
779 // CHECK: movzwl %ax, %eax
780 // CHECK: encoding: [0x0f,0xb7,0xc0]
783 // CHECK: movzbq %bl, %rax
784 // CHECK: encoding: [0x48,0x0f,0xb6,0xc3]
787 // CHECK: movzwq %cx, %rax
788 // CHECK: encoding: [0x48,0x0f,0xb7,0xc1]
791 // CHECK: movsbw (%rax), %ax
792 // CHECK: encoding: [0x66,0x0f,0xbe,0x00]
795 // CHECK: movzbw (%rax), %ax
796 // CHECK: encoding: [0x66,0x0f,0xb6,0x00]
801 // CHECK: [0x65,0x8b,0x04,0x25,0x7c,0x00,0x00,0x00]
804 // CHECK: jmpq *8(%rax)
805 // CHECK: encoding: [0xff,0x60,0x08]
808 // CHECK: btq $61, -216(%rbp)
809 // CHECK: encoding: [0x48,0x0f,0xba,0xa5,0x28,0xff,0xff,0xff,0x3d]
817 // CHECK: encoding: [0x67,0xe3,A]
820 // CHECK: encoding: [0xe3,A]
824 // CHECK: xchgl %ecx, 368(%rax)
825 xchgl %ecx, 368(%rax)
826 // CHECK: xchgl %ecx, 368(%rax)
829 xchg 0xdeadbeef(%rbx,%rcx,8),%bl
830 // CHECK: xchgb %bl, 3735928559(%rbx,%rcx,8)
837 // CHECK: incl 1(%rsp)
842 // CHECK: incl 1(%rsp)
847 // CHECK: encoding: [0xf3]
849 // CHECK: encoding: [0xa5]
855 // CHECK: encoding: [0xcf]
858 // CHECK: encoding: [0x66,0xcf]
861 // CHECK: encoding: [0xcf]
864 // CHECK: encoding: [0x48,0xcf]
867 // CHECK: retw $31438
868 // CHECK: encoding: [0x66,0xc2,0xce,0x7a]
871 // CHECK: lretw $31438
872 // CHECK: encoding: [0x66,0xca,0xce,0x7a]
876 lretq // CHECK: lretq # encoding: [0x48,0xcb]
877 lretl // CHECK: lretl # encoding: [0xcb]
878 lret // CHECK: lretl # encoding: [0xcb]
879 lretw // CHECK: lretw # encoding: [0x66,0xcb]
884 // CHECK: encoding: [0x0f,0x07]
887 // CHECK: encoding: [0x0f,0x07]
890 // CHECK: encoding: [0x48,0x0f,0x07]
895 // CHECK: encoding: [0x0f,0xa0]
898 // CHECK: encoding: [0x0f,0xa8]
902 // CHECK: encoding: [0x66,0x0f,0xa0]
905 // CHECK: encoding: [0x66,0x0f,0xa8]
910 // CHECK: encoding: [0x0f,0xa1]
913 // CHECK: encoding: [0x0f,0xa9]
917 // CHECK: encoding: [0x66,0x0f,0xa1]
920 // CHECK: encoding: [0x66,0x0f,0xa9]
925 // CHECK: fildll -8(%rsp)
926 // CHECK: encoding: [0xdf,0x6c,0x24,0xf8]
927 // CHECK: fildll -8(%rsp)
928 // CHECK: encoding: [0xdf,0x6c,0x24,0xf8]
933 // CHECK: leaq -40(%rbp), %r15
938 // rdar://8013734 - Alias dr6=db6
941 // CHECK: movq %dr6, %rax
942 // CHECK: movq %dr6, %rax
945 // INC/DEC encodings.
946 incb %al // CHECK: incb %al # encoding: [0xfe,0xc0]
947 incw %ax // CHECK: incw %ax # encoding: [0x66,0xff,0xc0]
948 incl %eax // CHECK: incl %eax # encoding: [0xff,0xc0]
949 decb %al // CHECK: decb %al # encoding: [0xfe,0xc8]
950 decw %ax // CHECK: decw %ax # encoding: [0x66,0xff,0xc8]
951 decl %eax // CHECK: decl %eax # encoding: [0xff,0xc8]
954 // CHECK: lgdtq 4(%rax)
955 // CHECK: encoding: [0x0f,0x01,0x50,0x04]
958 // CHECK: lgdtq 4(%rax)
959 // CHECK: encoding: [0x0f,0x01,0x50,0x04]
962 // CHECK: lidtq 4(%rax)
963 // CHECK: encoding: [0x0f,0x01,0x58,0x04]
966 // CHECK: lidtq 4(%rax)
967 // CHECK: encoding: [0x0f,0x01,0x58,0x04]
970 // CHECK: sgdtq 4(%rax)
971 // CHECK: encoding: [0x0f,0x01,0x40,0x04]
974 // CHECK: sgdtq 4(%rax)
975 // CHECK: encoding: [0x0f,0x01,0x40,0x04]
978 // CHECK: sidtq 4(%rax)
979 // CHECK: encoding: [0x0f,0x01,0x48,0x04]
982 // CHECK: sidtq 4(%rax)
983 // CHECK: encoding: [0x0f,0x01,0x48,0x04]
988 mov (%rsi), %gs // CHECK: movl (%rsi), %gs # encoding: [0x8e,0x2e]
989 mov %gs, (%rsi) // CHECK: movl %gs, (%rsi) # encoding: [0x8c,0x2e]
996 //CHECK: divl 3735928559(%ebx,%ecx,8)
999 //CHECK: divl 3133065982
1000 //CHECK: divl 305419896
1004 //CHECK: idivl 3735928559(%ebx,%ecx,8)
1006 //CHECK: idivl 32493
1007 //CHECK: idivl 3133065982
1008 //CHECK: idivl 305419896
1012 div 0xdeadbeef(%ebx,%ecx,8),%eax
1020 idiv 0xdeadbeef(%ebx,%ecx,8),%eax
1023 idiv 0xbabecafe,%eax
1024 idiv 0x12345678,%eax
1027 movd %rax, %mm5 // CHECK: movd %rax, %mm5 # encoding: [0x48,0x0f,0x6e,0xe8]
1028 movd %mm5, %rbx // CHECK: movd %mm5, %rbx # encoding: [0x48,0x0f,0x7e,0xeb]
1029 movq %rax, %mm5 // CHECK: movd %rax, %mm5 # encoding: [0x48,0x0f,0x6e,0xe8]
1030 movq %mm5, %rbx // CHECK: movd %mm5, %rbx # encoding: [0x48,0x0f,0x7e,0xeb]
1032 rex64 // CHECK: rex64 # encoding: [0x48]
1033 data16 // CHECK: data16 # encoding: [0x66]
1036 movq 18446744073709551615,%rbx // CHECK: movq -1, %rbx
1039 movdqu %xmm0, %xmm1 // CHECK: movdqu %xmm0, %xmm1 # encoding: [0xf3,0x0f,0x6f,0xc8]
1042 xgetbv // CHECK: xgetbv # encoding: [0x0f,0x01,0xd0]
1043 xsetbv // CHECK: xsetbv # encoding: [0x0f,0x01,0xd1]
1046 // CHECK: encoding: [0xe1,A]
1050 // CHECK: encoding: [0xe0,A]
1053 // CHECK: outsb (%rsi), %dx # encoding: [0x6e]
1057 outsb %ds:(%rsi), %dx
1060 // CHECK: outsw (%rsi), %dx # encoding: [0x66,0x6f]
1064 outsw %ds:(%rsi), %dx
1067 // CHECK: outsl (%rsi), %dx # encoding: [0x6f]
1070 outsl %ds:(%rsi), %dx
1073 // CHECK: insb %dx, %es:(%rdi) # encoding: [0x6c]
1076 insb %dx, %es:(%rdi)
1078 // CHECK: insw %dx, %es:(%rdi) # encoding: [0x66,0x6d]
1081 insw %dx, %es:(%rdi)
1083 // CHECK: insl %dx, %es:(%rdi) # encoding: [0x6d]
1086 insl %dx, %es:(%rdi)
1088 // CHECK: movsb (%rsi), %es:(%rdi) # encoding: [0xa4]
1092 movsb %ds:(%rsi), %es:(%rdi)
1093 movsb (%rsi), %es:(%rdi)
1095 // CHECK: movsw (%rsi), %es:(%rdi) # encoding: [0x66,0xa5]
1099 movsw %ds:(%rsi), %es:(%rdi)
1100 movsw (%rsi), %es:(%rdi)
1102 // CHECK: movsl (%rsi), %es:(%rdi) # encoding: [0xa5]
1106 movsl %ds:(%rsi), %es:(%rdi)
1107 movsl (%rsi), %es:(%rdi)
1110 movsl (%rsi), (%rdi)
1112 // CHECK: movsq (%rsi), %es:(%rdi) # encoding: [0x48,0xa5]
1116 movsq %ds:(%rsi), %es:(%rdi)
1117 movsq (%rsi), %es:(%rdi)
1119 // CHECK: lodsb (%rsi), %al # encoding: [0xac]
1125 lodsb %ds:(%rsi), %al
1127 lods %ds:(%rsi), %al
1130 // CHECK: lodsw (%rsi), %ax # encoding: [0x66,0xad]
1136 lodsw %ds:(%rsi), %ax
1138 lods %ds:(%rsi), %ax
1141 // CHECK: lodsl (%rsi), %eax # encoding: [0xad]
1147 lodsl %ds:(%rsi), %eax
1149 lods %ds:(%rsi), %eax
1152 // CHECK: lodsq (%rsi), %rax # encoding: [0x48,0xad]
1158 lodsq %ds:(%rsi), %rax
1160 lods %ds:(%rsi), %rax
1163 // CHECK: stosb %al, %es:(%rdi) # encoding: [0xaa]
1167 stosb %al, %es:(%rdi)
1168 stos %al, %es:(%rdi)
1170 // CHECK: stosw %ax, %es:(%rdi) # encoding: [0x66,0xab]
1174 stosw %ax, %es:(%rdi)
1175 stos %ax, %es:(%rdi)
1177 // CHECK: stosl %eax, %es:(%rdi) # encoding: [0xab]
1181 stosl %eax, %es:(%rdi)
1182 stos %eax, %es:(%rdi)
1184 // CHECK: stosq %rax, %es:(%rdi) # encoding: [0x48,0xab]
1188 stosq %rax, %es:(%rdi)
1189 stos %rax, %es:(%rdi)
1192 // CHECK: encoding: [0x66,0x0f,0x00,0xc8]
1196 // CHECK: encoding: [0x0f,0x00,0xc8]
1200 // CHECK: encoding: [0x66,0x0f,0x00,0xc8]
1204 // CHECK: encoding: [0x48,0x0f,0x00,0xc8]
1207 // CHECK: movd %rdi, %xmm0
1208 // CHECK: encoding: [0x66,0x48,0x0f,0x6e,0xc7]
1211 // CHECK: movd %rdi, %xmm0
1212 // CHECK: encoding: [0x66,0x48,0x0f,0x6e,0xc7]
1215 // CHECK: movd %xmm0, %rax
1216 // CHECK: encoding: [0x66,0x48,0x0f,0x7e,0xc0]
1219 // CHECK: movntil %eax, (%rdi)
1220 // CHECK: encoding: [0x0f,0xc3,0x07]
1222 movntil %eax, (%rdi)
1225 // CHECK: movntiq %rax, (%rdi)
1226 // CHECK: encoding: [0x48,0x0f,0xc3,0x07]
1228 movntiq %rax, (%rdi)
1231 // CHECK: pclmulqdq $17, %xmm0, %xmm1
1232 // CHECK: encoding: [0x66,0x0f,0x3a,0x44,0xc8,0x11]
1233 pclmulhqhqdq %xmm0, %xmm1
1235 // CHECK: pclmulqdq $1, %xmm0, %xmm1
1236 // CHECK: encoding: [0x66,0x0f,0x3a,0x44,0xc8,0x01]
1237 pclmulqdq $1, %xmm0, %xmm1
1239 // CHECK: pclmulqdq $16, (%rdi), %xmm1
1240 // CHECK: encoding: [0x66,0x0f,0x3a,0x44,0x0f,0x10]
1241 pclmullqhqdq (%rdi), %xmm1
1243 // CHECK: pclmulqdq $0, (%rdi), %xmm1
1244 // CHECK: encoding: [0x66,0x0f,0x3a,0x44,0x0f,0x00]
1245 pclmulqdq $0, (%rdi), %xmm1
1248 // CHECK: xchgq %rax, %rax
1249 // CHECK: encoding: [0x48,0x90]
1252 // CHECK: xchgl %eax, %eax
1253 // CHECK: encoding: [0x87,0xc0]
1256 // CHECK: xchgw %ax, %ax
1257 // CHECK: encoding: [0x66,0x90]
1260 // CHECK: xchgl %ecx, %eax
1261 // CHECK: encoding: [0x91]
1264 // CHECK: xchgl %ecx, %eax
1265 // CHECK: encoding: [0x91]
1269 // CHECK: encoding: [0x0f,0x35]
1273 // CHECK: encoding: [0x0f,0x35]
1277 // CHECK: encoding: [0x48,0x0f,0x35]
1281 // CHECK: encoding: [0x0f,0x01,0xca]
1285 // CHECK: encoding: [0x0f,0x01,0xcb]
1288 // CHECK: faddp %st(1)
1289 // CHECK: fmulp %st(1)
1290 // CHECK: fsubp %st(1)
1291 // CHECK: fsubrp %st(1)
1292 // CHECK: fdivp %st(1)
1293 // CHECK: fdivrp %st(1)
1294 faddp %st(0), %st(1)
1295 fmulp %st(0), %st(1)
1296 fsubp %st(0), %st(1)
1297 fsubrp %st(0), %st(1)
1298 fdivp %st(0), %st(1)
1299 fdivrp %st(0), %st(1)
1301 // CHECK: faddp %st(1)
1302 // CHECK: fmulp %st(1)
1303 // CHECK: fsubp %st(1)
1304 // CHECK: fsubrp %st(1)
1305 // CHECK: fdivp %st(1)
1306 // CHECK: fdivrp %st(1)
1307 faddp %st(1), %st(0)
1308 fmulp %st(1), %st(0)
1309 fsubp %st(1), %st(0)
1310 fsubrp %st(1), %st(0)
1311 fdivp %st(1), %st(0)
1312 fdivrp %st(1), %st(0)
1314 // CHECK: faddp %st(1)
1315 // CHECK: fmulp %st(1)
1316 // CHECK: fsubp %st(1)
1317 // CHECK: fsubrp %st(1)
1318 // CHECK: fdivp %st(1)
1319 // CHECK: fdivrp %st(1)
1327 // CHECK: faddp %st(1)
1328 // CHECK: fmulp %st(1)
1329 // CHECK: fsubp %st(1)
1330 // CHECK: fsubrp %st(1)
1331 // CHECK: fdivp %st(1)
1332 // CHECK: fdivrp %st(1)
1340 // CHECK: fadd %st(1)
1341 // CHECK: fmul %st(1)
1342 // CHECK: fsub %st(1)
1343 // CHECK: fsubr %st(1)
1344 // CHECK: fdiv %st(1)
1345 // CHECK: fdivr %st(1)
1349 fsubr %st(1), %st(0)
1351 fdivr %st(1), %st(0)
1353 // CHECK: fadd %st(0), %st(1)
1354 // CHECK: fmul %st(0), %st(1)
1355 // CHECK: fsub %st(0), %st(1)
1356 // CHECK: fsubr %st(0), %st(1)
1357 // CHECK: fdiv %st(0), %st(1)
1358 // CHECK: fdivr %st(0), %st(1)
1362 fsubr %st(0), %st(1)
1364 fdivr %st(0), %st(1)
1366 // CHECK: fadd %st(1)
1367 // CHECK: fmul %st(1)
1368 // CHECK: fsub %st(1)
1369 // CHECK: fsubr %st(1)
1370 // CHECK: fdiv %st(1)
1371 // CHECK: fdivr %st(1)
1379 // CHECK: movd %xmm0, %eax
1380 // CHECK: movd %xmm0, %rax
1381 // CHECK: movd %xmm0, %rax
1382 // CHECK: vmovd %xmm0, %eax
1383 // CHECK: vmovq %xmm0, %rax
1384 // CHECK: vmovq %xmm0, %rax
1392 // CHECK: seto 3735928559(%r10,%r9,8)
1393 // CHECK: encoding: [0x43,0x0f,0x90,0x84,0xca,0xef,0xbe,0xad,0xde]
1394 seto 0xdeadbeef(%r10,%r9,8)