# RUN: llvm-mc -triple x86_64 -disassemble %s | FileCheck %s --check-prefix=ATT # RUN: llvm-mc -triple x86_64 -disassemble -output-asm-variant=1 %s | FileCheck %s --check-prefix=INTEL # ATT: {evex} xorb $123, %bl # INTEL: {evex} xor bl, 123 0x62,0xf4,0x7c,0x08,0x80,0xf3,0x7b # ATT: {nf} xorb $123, %bl # INTEL: {nf} xor bl, 123 0x62,0xf4,0x7c,0x0c,0x80,0xf3,0x7b # ATT: xorb $123, %bl, %cl # INTEL: xor cl, bl, 123 0x62,0xf4,0x74,0x18,0x80,0xf3,0x7b # ATT: {nf} xorb $123, %bl, %cl # INTEL: {nf} xor cl, bl, 123 0x62,0xf4,0x74,0x1c,0x80,0xf3,0x7b # ATT: {evex} xorw $123, %dx # INTEL: {evex} xor dx, 123 0x62,0xf4,0x7d,0x08,0x83,0xf2,0x7b # ATT: {nf} xorw $123, %dx # INTEL: {nf} xor dx, 123 0x62,0xf4,0x7d,0x0c,0x83,0xf2,0x7b # ATT: xorw $123, %dx, %ax # INTEL: xor ax, dx, 123 0x62,0xf4,0x7d,0x18,0x83,0xf2,0x7b # ATT: {nf} xorw $123, %dx, %ax # INTEL: {nf} xor ax, dx, 123 0x62,0xf4,0x7d,0x1c,0x83,0xf2,0x7b # ATT: {evex} xorl $123, %ecx # INTEL: {evex} xor ecx, 123 0x62,0xf4,0x7c,0x08,0x83,0xf1,0x7b # ATT: {nf} xorl $123, %ecx # INTEL: {nf} xor ecx, 123 0x62,0xf4,0x7c,0x0c,0x83,0xf1,0x7b # ATT: xorl $123, %ecx, %edx # INTEL: xor edx, ecx, 123 0x62,0xf4,0x6c,0x18,0x83,0xf1,0x7b # ATT: {nf} xorl $123, %ecx, %edx # INTEL: {nf} xor edx, ecx, 123 0x62,0xf4,0x6c,0x1c,0x83,0xf1,0x7b # ATT: {evex} xorq $123, %r9 # INTEL: {evex} xor r9, 123 0x62,0xd4,0xfc,0x08,0x83,0xf1,0x7b # ATT: {nf} xorq $123, %r9 # INTEL: {nf} xor r9, 123 0x62,0xd4,0xfc,0x0c,0x83,0xf1,0x7b # ATT: xorq $123, %r9, %r15 # INTEL: xor r15, r9, 123 0x62,0xd4,0x84,0x18,0x83,0xf1,0x7b # ATT: {nf} xorq $123, %r9, %r15 # INTEL: {nf} xor r15, r9, 123 0x62,0xd4,0x84,0x1c,0x83,0xf1,0x7b # ATT: {evex} xorb $123, 291(%r8,%rax,4) # INTEL: {evex} xor byte ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x7c,0x08,0x80,0xb4,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {nf} xorb $123, 291(%r8,%rax,4) # INTEL: {nf} xor byte ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x7c,0x0c,0x80,0xb4,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: xorb $123, 291(%r8,%rax,4), %bl # INTEL: xor bl, byte ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x64,0x18,0x80,0xb4,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {nf} xorb $123, 291(%r8,%rax,4), %bl # INTEL: {nf} xor bl, byte ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x64,0x1c,0x80,0xb4,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {evex} xorw $123, 291(%r8,%rax,4) # INTEL: {evex} xor word ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x7d,0x08,0x83,0xb4,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {nf} xorw $123, 291(%r8,%rax,4) # INTEL: {nf} xor word ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x7d,0x0c,0x83,0xb4,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: xorw $123, 291(%r8,%rax,4), %dx # INTEL: xor dx, word ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x6d,0x18,0x83,0xb4,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {nf} xorw $123, 291(%r8,%rax,4), %dx # INTEL: {nf} xor dx, word ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x6d,0x1c,0x83,0xb4,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {evex} xorl $123, 291(%r8,%rax,4) # INTEL: {evex} xor dword ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x7c,0x08,0x83,0xb4,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {nf} xorl $123, 291(%r8,%rax,4) # INTEL: {nf} xor dword ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x7c,0x0c,0x83,0xb4,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: xorl $123, 291(%r8,%rax,4), %ecx # INTEL: xor ecx, dword ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x74,0x18,0x83,0xb4,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {nf} xorl $123, 291(%r8,%rax,4), %ecx # INTEL: {nf} xor ecx, dword ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x74,0x1c,0x83,0xb4,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {evex} xorq $123, 291(%r8,%rax,4) # INTEL: {evex} xor qword ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0xfc,0x08,0x83,0xb4,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {nf} xorq $123, 291(%r8,%rax,4) # INTEL: {nf} xor qword ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0xfc,0x0c,0x83,0xb4,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: xorq $123, 291(%r8,%rax,4), %r9 # INTEL: xor r9, qword ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0xb4,0x18,0x83,0xb4,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {nf} xorq $123, 291(%r8,%rax,4), %r9 # INTEL: {nf} xor r9, qword ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0xb4,0x1c,0x83,0xb4,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {evex} xorw $1234, %dx # INTEL: {evex} xor dx, 1234 0x62,0xf4,0x7d,0x08,0x81,0xf2,0xd2,0x04 # ATT: {nf} xorw $1234, %dx # INTEL: {nf} xor dx, 1234 0x62,0xf4,0x7d,0x0c,0x81,0xf2,0xd2,0x04 # ATT: xorw $1234, %dx, %ax # INTEL: xor ax, dx, 1234 0x62,0xf4,0x7d,0x18,0x81,0xf2,0xd2,0x04 # ATT: {nf} xorw $1234, %dx, %ax # INTEL: {nf} xor ax, dx, 1234 0x62,0xf4,0x7d,0x1c,0x81,0xf2,0xd2,0x04 # ATT: {evex} xorw $1234, 291(%r8,%rax,4) # INTEL: {evex} xor word ptr [r8 + 4*rax + 291], 1234 0x62,0xd4,0x7d,0x08,0x81,0xb4,0x80,0x23,0x01,0x00,0x00,0xd2,0x04 # ATT: {nf} xorw $1234, 291(%r8,%rax,4) # INTEL: {nf} xor word ptr [r8 + 4*rax + 291], 1234 0x62,0xd4,0x7d,0x0c,0x81,0xb4,0x80,0x23,0x01,0x00,0x00,0xd2,0x04 # ATT: xorw $1234, 291(%r8,%rax,4), %dx # INTEL: xor dx, word ptr [r8 + 4*rax + 291], 1234 0x62,0xd4,0x6d,0x18,0x81,0xb4,0x80,0x23,0x01,0x00,0x00,0xd2,0x04 # ATT: {nf} xorw $1234, 291(%r8,%rax,4), %dx # INTEL: {nf} xor dx, word ptr [r8 + 4*rax + 291], 1234 0x62,0xd4,0x6d,0x1c,0x81,0xb4,0x80,0x23,0x01,0x00,0x00,0xd2,0x04 # ATT: {evex} xorl $123456, %ecx # INTEL: {evex} xor ecx, 123456 0x62,0xf4,0x7c,0x08,0x81,0xf1,0x40,0xe2,0x01,0x00 # ATT: {nf} xorl $123456, %ecx # INTEL: {nf} xor ecx, 123456 0x62,0xf4,0x7c,0x0c,0x81,0xf1,0x40,0xe2,0x01,0x00 # ATT: xorl $123456, %ecx, %edx # INTEL: xor edx, ecx, 123456 0x62,0xf4,0x6c,0x18,0x81,0xf1,0x40,0xe2,0x01,0x00 # ATT: {nf} xorl $123456, %ecx, %edx # INTEL: {nf} xor edx, ecx, 123456 0x62,0xf4,0x6c,0x1c,0x81,0xf1,0x40,0xe2,0x01,0x00 # ATT: {evex} xorq $123456, %r9 # INTEL: {evex} xor r9, 123456 0x62,0xd4,0xfc,0x08,0x81,0xf1,0x40,0xe2,0x01,0x00 # ATT: {nf} xorq $123456, %r9 # INTEL: {nf} xor r9, 123456 0x62,0xd4,0xfc,0x0c,0x81,0xf1,0x40,0xe2,0x01,0x00 # ATT: xorq $123456, %r9, %r15 # INTEL: xor r15, r9, 123456 0x62,0xd4,0x84,0x18,0x81,0xf1,0x40,0xe2,0x01,0x00 # ATT: {nf} xorq $123456, %r9, %r15 # INTEL: {nf} xor r15, r9, 123456 0x62,0xd4,0x84,0x1c,0x81,0xf1,0x40,0xe2,0x01,0x00 # ATT: {evex} xorl $123456, 291(%r8,%rax,4) # INTEL: {evex} xor dword ptr [r8 + 4*rax + 291], 123456 0x62,0xd4,0x7c,0x08,0x81,0xb4,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00 # ATT: {nf} xorl $123456, 291(%r8,%rax,4) # INTEL: {nf} xor dword ptr [r8 + 4*rax + 291], 123456 0x62,0xd4,0x7c,0x0c,0x81,0xb4,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00 # ATT: xorl $123456, 291(%r8,%rax,4), %ecx # INTEL: xor ecx, dword ptr [r8 + 4*rax + 291], 123456 0x62,0xd4,0x74,0x18,0x81,0xb4,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00 # ATT: {nf} xorl $123456, 291(%r8,%rax,4), %ecx # INTEL: {nf} xor ecx, dword ptr [r8 + 4*rax + 291], 123456 0x62,0xd4,0x74,0x1c,0x81,0xb4,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00 # ATT: {evex} xorq $123456, 291(%r8,%rax,4) # INTEL: {evex} xor qword ptr [r8 + 4*rax + 291], 123456 0x62,0xd4,0xfc,0x08,0x81,0xb4,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00 # ATT: {nf} xorq $123456, 291(%r8,%rax,4) # INTEL: {nf} xor qword ptr [r8 + 4*rax + 291], 123456 0x62,0xd4,0xfc,0x0c,0x81,0xb4,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00 # ATT: xorq $123456, 291(%r8,%rax,4), %r9 # INTEL: xor r9, qword ptr [r8 + 4*rax + 291], 123456 0x62,0xd4,0xb4,0x18,0x81,0xb4,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00 # ATT: {nf} xorq $123456, 291(%r8,%rax,4), %r9 # INTEL: {nf} xor r9, qword ptr [r8 + 4*rax + 291], 123456 0x62,0xd4,0xb4,0x1c,0x81,0xb4,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00 # ATT: {evex} xorb %bl, %cl # INTEL: {evex} xor cl, bl 0x62,0xf4,0x7c,0x08,0x30,0xd9 # ATT: {nf} xorb %bl, %cl # INTEL: {nf} xor cl, bl 0x62,0xf4,0x7c,0x0c,0x30,0xd9 # ATT: xorb %bl, %cl, %r8b # INTEL: xor r8b, cl, bl 0x62,0xf4,0x3c,0x18,0x30,0xd9 # ATT: {nf} xorb %bl, %cl, %r8b # INTEL: {nf} xor r8b, cl, bl 0x62,0xf4,0x3c,0x1c,0x30,0xd9 # ATT: {evex} xorb %bl, 291(%r8,%rax,4) # INTEL: {evex} xor byte ptr [r8 + 4*rax + 291], bl 0x62,0xd4,0x7c,0x08,0x30,0x9c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} xorb %bl, 291(%r8,%rax,4) # INTEL: {nf} xor byte ptr [r8 + 4*rax + 291], bl 0x62,0xd4,0x7c,0x0c,0x30,0x9c,0x80,0x23,0x01,0x00,0x00 # ATT: xorb %bl, 291(%r8,%rax,4), %cl # INTEL: xor cl, byte ptr [r8 + 4*rax + 291], bl 0x62,0xd4,0x74,0x18,0x30,0x9c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} xorb %bl, 291(%r8,%rax,4), %cl # INTEL: {nf} xor cl, byte ptr [r8 + 4*rax + 291], bl 0x62,0xd4,0x74,0x1c,0x30,0x9c,0x80,0x23,0x01,0x00,0x00 # ATT: {evex} xorw %dx, %ax # INTEL: {evex} xor ax, dx 0x62,0xf4,0x7d,0x08,0x31,0xd0 # ATT: {nf} xorw %dx, %ax # INTEL: {nf} xor ax, dx 0x62,0xf4,0x7d,0x0c,0x31,0xd0 # ATT: xorw %dx, %ax, %r9w # INTEL: xor r9w, ax, dx 0x62,0xf4,0x35,0x18,0x31,0xd0 # ATT: {nf} xorw %dx, %ax, %r9w # INTEL: {nf} xor r9w, ax, dx 0x62,0xf4,0x35,0x1c,0x31,0xd0 # ATT: {evex} xorw %dx, 291(%r8,%rax,4) # INTEL: {evex} xor word ptr [r8 + 4*rax + 291], dx 0x62,0xd4,0x7d,0x08,0x31,0x94,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} xorw %dx, 291(%r8,%rax,4) # INTEL: {nf} xor word ptr [r8 + 4*rax + 291], dx 0x62,0xd4,0x7d,0x0c,0x31,0x94,0x80,0x23,0x01,0x00,0x00 # ATT: xorw %dx, 291(%r8,%rax,4), %ax # INTEL: xor ax, word ptr [r8 + 4*rax + 291], dx 0x62,0xd4,0x7d,0x18,0x31,0x94,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} xorw %dx, 291(%r8,%rax,4), %ax # INTEL: {nf} xor ax, word ptr [r8 + 4*rax + 291], dx 0x62,0xd4,0x7d,0x1c,0x31,0x94,0x80,0x23,0x01,0x00,0x00 # ATT: {evex} xorl %ecx, %edx # INTEL: {evex} xor edx, ecx 0x62,0xf4,0x7c,0x08,0x31,0xca # ATT: {nf} xorl %ecx, %edx # INTEL: {nf} xor edx, ecx 0x62,0xf4,0x7c,0x0c,0x31,0xca # ATT: xorl %ecx, %edx, %r10d # INTEL: xor r10d, edx, ecx 0x62,0xf4,0x2c,0x18,0x31,0xca # ATT: {nf} xorl %ecx, %edx, %r10d # INTEL: {nf} xor r10d, edx, ecx 0x62,0xf4,0x2c,0x1c,0x31,0xca # ATT: {evex} xorl %ecx, 291(%r8,%rax,4) # INTEL: {evex} xor dword ptr [r8 + 4*rax + 291], ecx 0x62,0xd4,0x7c,0x08,0x31,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} xorl %ecx, 291(%r8,%rax,4) # INTEL: {nf} xor dword ptr [r8 + 4*rax + 291], ecx 0x62,0xd4,0x7c,0x0c,0x31,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: xorl %ecx, 291(%r8,%rax,4), %edx # INTEL: xor edx, dword ptr [r8 + 4*rax + 291], ecx 0x62,0xd4,0x6c,0x18,0x31,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} xorl %ecx, 291(%r8,%rax,4), %edx # INTEL: {nf} xor edx, dword ptr [r8 + 4*rax + 291], ecx 0x62,0xd4,0x6c,0x1c,0x31,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {evex} xorq %r9, %r15 # INTEL: {evex} xor r15, r9 0x62,0x54,0xfc,0x08,0x31,0xcf # ATT: {nf} xorq %r9, %r15 # INTEL: {nf} xor r15, r9 0x62,0x54,0xfc,0x0c,0x31,0xcf # ATT: xorq %r9, %r15, %r11 # INTEL: xor r11, r15, r9 0x62,0x54,0xa4,0x18,0x31,0xcf # ATT: {nf} xorq %r9, %r15, %r11 # INTEL: {nf} xor r11, r15, r9 0x62,0x54,0xa4,0x1c,0x31,0xcf # ATT: {evex} xorq %r9, 291(%r8,%rax,4) # INTEL: {evex} xor qword ptr [r8 + 4*rax + 291], r9 0x62,0x54,0xfc,0x08,0x31,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} xorq %r9, 291(%r8,%rax,4) # INTEL: {nf} xor qword ptr [r8 + 4*rax + 291], r9 0x62,0x54,0xfc,0x0c,0x31,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: xorq %r9, 291(%r8,%rax,4), %r15 # INTEL: xor r15, qword ptr [r8 + 4*rax + 291], r9 0x62,0x54,0x84,0x18,0x31,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} xorq %r9, 291(%r8,%rax,4), %r15 # INTEL: {nf} xor r15, qword ptr [r8 + 4*rax + 291], r9 0x62,0x54,0x84,0x1c,0x31,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {evex} xorb 291(%r8,%rax,4), %bl # INTEL: {evex} xor bl, byte ptr [r8 + 4*rax + 291] 0x62,0xd4,0x7c,0x08,0x32,0x9c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} xorb 291(%r8,%rax,4), %bl # INTEL: {nf} xor bl, byte ptr [r8 + 4*rax + 291] 0x62,0xd4,0x7c,0x0c,0x32,0x9c,0x80,0x23,0x01,0x00,0x00 # ATT: xorb 291(%r8,%rax,4), %bl, %cl # INTEL: xor cl, bl, byte ptr [r8 + 4*rax + 291] 0x62,0xd4,0x74,0x18,0x32,0x9c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} xorb 291(%r8,%rax,4), %bl, %cl # INTEL: {nf} xor cl, bl, byte ptr [r8 + 4*rax + 291] 0x62,0xd4,0x74,0x1c,0x32,0x9c,0x80,0x23,0x01,0x00,0x00 # ATT: {evex} xorw 291(%r8,%rax,4), %dx # INTEL: {evex} xor dx, word ptr [r8 + 4*rax + 291] 0x62,0xd4,0x7d,0x08,0x33,0x94,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} xorw 291(%r8,%rax,4), %dx # INTEL: {nf} xor dx, word ptr [r8 + 4*rax + 291] 0x62,0xd4,0x7d,0x0c,0x33,0x94,0x80,0x23,0x01,0x00,0x00 # ATT: xorw 291(%r8,%rax,4), %dx, %ax # INTEL: xor ax, dx, word ptr [r8 + 4*rax + 291] 0x62,0xd4,0x7d,0x18,0x33,0x94,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} xorw 291(%r8,%rax,4), %dx, %ax # INTEL: {nf} xor ax, dx, word ptr [r8 + 4*rax + 291] 0x62,0xd4,0x7d,0x1c,0x33,0x94,0x80,0x23,0x01,0x00,0x00 # ATT: {evex} xorl 291(%r8,%rax,4), %ecx # INTEL: {evex} xor ecx, dword ptr [r8 + 4*rax + 291] 0x62,0xd4,0x7c,0x08,0x33,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} xorl 291(%r8,%rax,4), %ecx # INTEL: {nf} xor ecx, dword ptr [r8 + 4*rax + 291] 0x62,0xd4,0x7c,0x0c,0x33,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: xorl 291(%r8,%rax,4), %ecx, %edx # INTEL: xor edx, ecx, dword ptr [r8 + 4*rax + 291] 0x62,0xd4,0x6c,0x18,0x33,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} xorl 291(%r8,%rax,4), %ecx, %edx # INTEL: {nf} xor edx, ecx, dword ptr [r8 + 4*rax + 291] 0x62,0xd4,0x6c,0x1c,0x33,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {evex} xorq 291(%r8,%rax,4), %r9 # INTEL: {evex} xor r9, qword ptr [r8 + 4*rax + 291] 0x62,0x54,0xfc,0x08,0x33,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} xorq 291(%r8,%rax,4), %r9 # INTEL: {nf} xor r9, qword ptr [r8 + 4*rax + 291] 0x62,0x54,0xfc,0x0c,0x33,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: xorq 291(%r8,%rax,4), %r9, %r15 # INTEL: xor r15, r9, qword ptr [r8 + 4*rax + 291] 0x62,0x54,0x84,0x18,0x33,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} xorq 291(%r8,%rax,4), %r9, %r15 # INTEL: {nf} xor r15, r9, qword ptr [r8 + 4*rax + 291] 0x62,0x54,0x84,0x1c,0x33,0x8c,0x80,0x23,0x01,0x00,0x00