# 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} addb $123, %bl # INTEL: {evex} add bl, 123 0x62,0xf4,0x7c,0x08,0x80,0xc3,0x7b # ATT: {nf} addb $123, %bl # INTEL: {nf} add bl, 123 0x62,0xf4,0x7c,0x0c,0x80,0xc3,0x7b # ATT: addb $123, %bl, %cl # INTEL: add cl, bl, 123 0x62,0xf4,0x74,0x18,0x80,0xc3,0x7b # ATT: {nf} addb $123, %bl, %cl # INTEL: {nf} add cl, bl, 123 0x62,0xf4,0x74,0x1c,0x80,0xc3,0x7b # ATT: {evex} addw $123, %dx # INTEL: {evex} add dx, 123 0x62,0xf4,0x7d,0x08,0x83,0xc2,0x7b # ATT: {nf} addw $123, %dx # INTEL: {nf} add dx, 123 0x62,0xf4,0x7d,0x0c,0x83,0xc2,0x7b # ATT: addw $123, %dx, %ax # INTEL: add ax, dx, 123 0x62,0xf4,0x7d,0x18,0x83,0xc2,0x7b # ATT: {nf} addw $123, %dx, %ax # INTEL: {nf} add ax, dx, 123 0x62,0xf4,0x7d,0x1c,0x83,0xc2,0x7b # ATT: {evex} addl $123, %ecx # INTEL: {evex} add ecx, 123 0x62,0xf4,0x7c,0x08,0x83,0xc1,0x7b # ATT: {nf} addl $123, %ecx # INTEL: {nf} add ecx, 123 0x62,0xf4,0x7c,0x0c,0x83,0xc1,0x7b # ATT: addl $123, %ecx, %edx # INTEL: add edx, ecx, 123 0x62,0xf4,0x6c,0x18,0x83,0xc1,0x7b # ATT: {nf} addl $123, %ecx, %edx # INTEL: {nf} add edx, ecx, 123 0x62,0xf4,0x6c,0x1c,0x83,0xc1,0x7b # ATT: {evex} addq $123, %r9 # INTEL: {evex} add r9, 123 0x62,0xd4,0xfc,0x08,0x83,0xc1,0x7b # ATT: {nf} addq $123, %r9 # INTEL: {nf} add r9, 123 0x62,0xd4,0xfc,0x0c,0x83,0xc1,0x7b # ATT: addq $123, %r9, %r15 # INTEL: add r15, r9, 123 0x62,0xd4,0x84,0x18,0x83,0xc1,0x7b # ATT: {nf} addq $123, %r9, %r15 # INTEL: {nf} add r15, r9, 123 0x62,0xd4,0x84,0x1c,0x83,0xc1,0x7b # ATT: {evex} addb $123, 291(%r8,%rax,4) # INTEL: {evex} add byte ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x7c,0x08,0x80,0x84,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {nf} addb $123, 291(%r8,%rax,4) # INTEL: {nf} add byte ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x7c,0x0c,0x80,0x84,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: addb $123, 291(%r8,%rax,4), %bl # INTEL: add bl, byte ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x64,0x18,0x80,0x84,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {nf} addb $123, 291(%r8,%rax,4), %bl # INTEL: {nf} add bl, byte ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x64,0x1c,0x80,0x84,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {evex} addw $123, 291(%r8,%rax,4) # INTEL: {evex} add word ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x7d,0x08,0x83,0x84,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {nf} addw $123, 291(%r8,%rax,4) # INTEL: {nf} add word ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x7d,0x0c,0x83,0x84,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: addw $123, 291(%r8,%rax,4), %dx # INTEL: add dx, word ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x6d,0x18,0x83,0x84,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {nf} addw $123, 291(%r8,%rax,4), %dx # INTEL: {nf} add dx, word ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x6d,0x1c,0x83,0x84,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {evex} addl $123, 291(%r8,%rax,4) # INTEL: {evex} add dword ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x7c,0x08,0x83,0x84,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {nf} addl $123, 291(%r8,%rax,4) # INTEL: {nf} add dword ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x7c,0x0c,0x83,0x84,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: addl $123, 291(%r8,%rax,4), %ecx # INTEL: add ecx, dword ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x74,0x18,0x83,0x84,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {nf} addl $123, 291(%r8,%rax,4), %ecx # INTEL: {nf} add ecx, dword ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x74,0x1c,0x83,0x84,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {evex} addq $123, 291(%r8,%rax,4) # INTEL: {evex} add qword ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0xfc,0x08,0x83,0x84,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {nf} addq $123, 291(%r8,%rax,4) # INTEL: {nf} add qword ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0xfc,0x0c,0x83,0x84,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: addq $123, 291(%r8,%rax,4), %r9 # INTEL: add r9, qword ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0xb4,0x18,0x83,0x84,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {nf} addq $123, 291(%r8,%rax,4), %r9 # INTEL: {nf} add r9, qword ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0xb4,0x1c,0x83,0x84,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {evex} addw $1234, %dx # INTEL: {evex} add dx, 1234 0x62,0xf4,0x7d,0x08,0x81,0xc2,0xd2,0x04 # ATT: {nf} addw $1234, %dx # INTEL: {nf} add dx, 1234 0x62,0xf4,0x7d,0x0c,0x81,0xc2,0xd2,0x04 # ATT: addw $1234, %dx, %ax # INTEL: add ax, dx, 1234 0x62,0xf4,0x7d,0x18,0x81,0xc2,0xd2,0x04 # ATT: {nf} addw $1234, %dx, %ax # INTEL: {nf} add ax, dx, 1234 0x62,0xf4,0x7d,0x1c,0x81,0xc2,0xd2,0x04 # ATT: {evex} addw $1234, 291(%r8,%rax,4) # INTEL: {evex} add word ptr [r8 + 4*rax + 291], 1234 0x62,0xd4,0x7d,0x08,0x81,0x84,0x80,0x23,0x01,0x00,0x00,0xd2,0x04 # ATT: {nf} addw $1234, 291(%r8,%rax,4) # INTEL: {nf} add word ptr [r8 + 4*rax + 291], 1234 0x62,0xd4,0x7d,0x0c,0x81,0x84,0x80,0x23,0x01,0x00,0x00,0xd2,0x04 # ATT: addw $1234, 291(%r8,%rax,4), %dx # INTEL: add dx, word ptr [r8 + 4*rax + 291], 1234 0x62,0xd4,0x6d,0x18,0x81,0x84,0x80,0x23,0x01,0x00,0x00,0xd2,0x04 # ATT: {nf} addw $1234, 291(%r8,%rax,4), %dx # INTEL: {nf} add dx, word ptr [r8 + 4*rax + 291], 1234 0x62,0xd4,0x6d,0x1c,0x81,0x84,0x80,0x23,0x01,0x00,0x00,0xd2,0x04 # ATT: {evex} addl $123456, %ecx # INTEL: {evex} add ecx, 123456 0x62,0xf4,0x7c,0x08,0x81,0xc1,0x40,0xe2,0x01,0x00 # ATT: {nf} addl $123456, %ecx # INTEL: {nf} add ecx, 123456 0x62,0xf4,0x7c,0x0c,0x81,0xc1,0x40,0xe2,0x01,0x00 # ATT: addl $123456, %ecx, %edx # INTEL: add edx, ecx, 123456 0x62,0xf4,0x6c,0x18,0x81,0xc1,0x40,0xe2,0x01,0x00 # ATT: {nf} addl $123456, %ecx, %edx # INTEL: {nf} add edx, ecx, 123456 0x62,0xf4,0x6c,0x1c,0x81,0xc1,0x40,0xe2,0x01,0x00 # ATT: {evex} addq $123456, %r9 # INTEL: {evex} add r9, 123456 0x62,0xd4,0xfc,0x08,0x81,0xc1,0x40,0xe2,0x01,0x00 # ATT: {nf} addq $123456, %r9 # INTEL: {nf} add r9, 123456 0x62,0xd4,0xfc,0x0c,0x81,0xc1,0x40,0xe2,0x01,0x00 # ATT: addq $123456, %r9, %r15 # INTEL: add r15, r9, 123456 0x62,0xd4,0x84,0x18,0x81,0xc1,0x40,0xe2,0x01,0x00 # ATT: {nf} addq $123456, %r9, %r15 # INTEL: {nf} add r15, r9, 123456 0x62,0xd4,0x84,0x1c,0x81,0xc1,0x40,0xe2,0x01,0x00 # ATT: {evex} addl $123456, 291(%r8,%rax,4) # INTEL: {evex} add dword ptr [r8 + 4*rax + 291], 123456 0x62,0xd4,0x7c,0x08,0x81,0x84,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00 # ATT: {nf} addl $123456, 291(%r8,%rax,4) # INTEL: {nf} add dword ptr [r8 + 4*rax + 291], 123456 0x62,0xd4,0x7c,0x0c,0x81,0x84,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00 # ATT: addl $123456, 291(%r8,%rax,4), %ecx # INTEL: add ecx, dword ptr [r8 + 4*rax + 291], 123456 0x62,0xd4,0x74,0x18,0x81,0x84,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00 # ATT: {nf} addl $123456, 291(%r8,%rax,4), %ecx # INTEL: {nf} add ecx, dword ptr [r8 + 4*rax + 291], 123456 0x62,0xd4,0x74,0x1c,0x81,0x84,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00 # ATT: {evex} addq $123456, 291(%r8,%rax,4) # INTEL: {evex} add qword ptr [r8 + 4*rax + 291], 123456 0x62,0xd4,0xfc,0x08,0x81,0x84,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00 # ATT: {nf} addq $123456, 291(%r8,%rax,4) # INTEL: {nf} add qword ptr [r8 + 4*rax + 291], 123456 0x62,0xd4,0xfc,0x0c,0x81,0x84,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00 # ATT: addq $123456, 291(%r8,%rax,4), %r9 # INTEL: add r9, qword ptr [r8 + 4*rax + 291], 123456 0x62,0xd4,0xb4,0x18,0x81,0x84,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00 # ATT: {nf} addq $123456, 291(%r8,%rax,4), %r9 # INTEL: {nf} add r9, qword ptr [r8 + 4*rax + 291], 123456 0x62,0xd4,0xb4,0x1c,0x81,0x84,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00 # ATT: {evex} addb %bl, %cl # INTEL: {evex} add cl, bl 0x62,0xf4,0x7c,0x08,0x00,0xd9 # ATT: {nf} addb %bl, %cl # INTEL: {nf} add cl, bl 0x62,0xf4,0x7c,0x0c,0x00,0xd9 # ATT: addb %bl, %cl, %r8b # INTEL: add r8b, cl, bl 0x62,0xf4,0x3c,0x18,0x00,0xd9 # ATT: {nf} addb %bl, %cl, %r8b # INTEL: {nf} add r8b, cl, bl 0x62,0xf4,0x3c,0x1c,0x00,0xd9 # ATT: {evex} addb %bl, 291(%r8,%rax,4) # INTEL: {evex} add byte ptr [r8 + 4*rax + 291], bl 0x62,0xd4,0x7c,0x08,0x00,0x9c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} addb %bl, 291(%r8,%rax,4) # INTEL: {nf} add byte ptr [r8 + 4*rax + 291], bl 0x62,0xd4,0x7c,0x0c,0x00,0x9c,0x80,0x23,0x01,0x00,0x00 # ATT: addb %bl, 291(%r8,%rax,4), %cl # INTEL: add cl, byte ptr [r8 + 4*rax + 291], bl 0x62,0xd4,0x74,0x18,0x00,0x9c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} addb %bl, 291(%r8,%rax,4), %cl # INTEL: {nf} add cl, byte ptr [r8 + 4*rax + 291], bl 0x62,0xd4,0x74,0x1c,0x00,0x9c,0x80,0x23,0x01,0x00,0x00 # ATT: {evex} addw %dx, %ax # INTEL: {evex} add ax, dx 0x62,0xf4,0x7d,0x08,0x01,0xd0 # ATT: {nf} addw %dx, %ax # INTEL: {nf} add ax, dx 0x62,0xf4,0x7d,0x0c,0x01,0xd0 # ATT: addw %dx, %ax, %r9w # INTEL: add r9w, ax, dx 0x62,0xf4,0x35,0x18,0x01,0xd0 # ATT: {nf} addw %dx, %ax, %r9w # INTEL: {nf} add r9w, ax, dx 0x62,0xf4,0x35,0x1c,0x01,0xd0 # ATT: {evex} addw %dx, 291(%r8,%rax,4) # INTEL: {evex} add word ptr [r8 + 4*rax + 291], dx 0x62,0xd4,0x7d,0x08,0x01,0x94,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} addw %dx, 291(%r8,%rax,4) # INTEL: {nf} add word ptr [r8 + 4*rax + 291], dx 0x62,0xd4,0x7d,0x0c,0x01,0x94,0x80,0x23,0x01,0x00,0x00 # ATT: addw %dx, 291(%r8,%rax,4), %ax # INTEL: add ax, word ptr [r8 + 4*rax + 291], dx 0x62,0xd4,0x7d,0x18,0x01,0x94,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} addw %dx, 291(%r8,%rax,4), %ax # INTEL: {nf} add ax, word ptr [r8 + 4*rax + 291], dx 0x62,0xd4,0x7d,0x1c,0x01,0x94,0x80,0x23,0x01,0x00,0x00 # ATT: {evex} addl %ecx, %edx # INTEL: {evex} add edx, ecx 0x62,0xf4,0x7c,0x08,0x01,0xca # ATT: {nf} addl %ecx, %edx # INTEL: {nf} add edx, ecx 0x62,0xf4,0x7c,0x0c,0x01,0xca # ATT: addl %ecx, %edx, %r10d # INTEL: add r10d, edx, ecx 0x62,0xf4,0x2c,0x18,0x01,0xca # ATT: {nf} addl %ecx, %edx, %r10d # INTEL: {nf} add r10d, edx, ecx 0x62,0xf4,0x2c,0x1c,0x01,0xca # ATT: {evex} addl %ecx, 291(%r8,%rax,4) # INTEL: {evex} add dword ptr [r8 + 4*rax + 291], ecx 0x62,0xd4,0x7c,0x08,0x01,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} addl %ecx, 291(%r8,%rax,4) # INTEL: {nf} add dword ptr [r8 + 4*rax + 291], ecx 0x62,0xd4,0x7c,0x0c,0x01,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: addl %ecx, 291(%r8,%rax,4), %edx # INTEL: add edx, dword ptr [r8 + 4*rax + 291], ecx 0x62,0xd4,0x6c,0x18,0x01,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} addl %ecx, 291(%r8,%rax,4), %edx # INTEL: {nf} add edx, dword ptr [r8 + 4*rax + 291], ecx 0x62,0xd4,0x6c,0x1c,0x01,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {evex} addq %r9, %r15 # INTEL: {evex} add r15, r9 0x62,0x54,0xfc,0x08,0x01,0xcf # ATT: {nf} addq %r9, %r15 # INTEL: {nf} add r15, r9 0x62,0x54,0xfc,0x0c,0x01,0xcf # ATT: addq %r9, %r15, %r11 # INTEL: add r11, r15, r9 0x62,0x54,0xa4,0x18,0x01,0xcf # ATT: {nf} addq %r9, %r15, %r11 # INTEL: {nf} add r11, r15, r9 0x62,0x54,0xa4,0x1c,0x01,0xcf # ATT: {evex} addq %r9, 291(%r8,%rax,4) # INTEL: {evex} add qword ptr [r8 + 4*rax + 291], r9 0x62,0x54,0xfc,0x08,0x01,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} addq %r9, 291(%r8,%rax,4) # INTEL: {nf} add qword ptr [r8 + 4*rax + 291], r9 0x62,0x54,0xfc,0x0c,0x01,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: addq %r9, 291(%r8,%rax,4), %r15 # INTEL: add r15, qword ptr [r8 + 4*rax + 291], r9 0x62,0x54,0x84,0x18,0x01,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} addq %r9, 291(%r8,%rax,4), %r15 # INTEL: {nf} add r15, qword ptr [r8 + 4*rax + 291], r9 0x62,0x54,0x84,0x1c,0x01,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {evex} addb 291(%r8,%rax,4), %bl # INTEL: {evex} add bl, byte ptr [r8 + 4*rax + 291] 0x62,0xd4,0x7c,0x08,0x02,0x9c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} addb 291(%r8,%rax,4), %bl # INTEL: {nf} add bl, byte ptr [r8 + 4*rax + 291] 0x62,0xd4,0x7c,0x0c,0x02,0x9c,0x80,0x23,0x01,0x00,0x00 # ATT: addb 291(%r8,%rax,4), %bl, %cl # INTEL: add cl, bl, byte ptr [r8 + 4*rax + 291] 0x62,0xd4,0x74,0x18,0x02,0x9c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} addb 291(%r8,%rax,4), %bl, %cl # INTEL: {nf} add cl, bl, byte ptr [r8 + 4*rax + 291] 0x62,0xd4,0x74,0x1c,0x02,0x9c,0x80,0x23,0x01,0x00,0x00 # ATT: {evex} addw 291(%r8,%rax,4), %dx # INTEL: {evex} add dx, word ptr [r8 + 4*rax + 291] 0x62,0xd4,0x7d,0x08,0x03,0x94,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} addw 291(%r8,%rax,4), %dx # INTEL: {nf} add dx, word ptr [r8 + 4*rax + 291] 0x62,0xd4,0x7d,0x0c,0x03,0x94,0x80,0x23,0x01,0x00,0x00 # ATT: addw 291(%r8,%rax,4), %dx, %ax # INTEL: add ax, dx, word ptr [r8 + 4*rax + 291] 0x62,0xd4,0x7d,0x18,0x03,0x94,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} addw 291(%r8,%rax,4), %dx, %ax # INTEL: {nf} add ax, dx, word ptr [r8 + 4*rax + 291] 0x62,0xd4,0x7d,0x1c,0x03,0x94,0x80,0x23,0x01,0x00,0x00 # ATT: {evex} addl 291(%r8,%rax,4), %ecx # INTEL: {evex} add ecx, dword ptr [r8 + 4*rax + 291] 0x62,0xd4,0x7c,0x08,0x03,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} addl 291(%r8,%rax,4), %ecx # INTEL: {nf} add ecx, dword ptr [r8 + 4*rax + 291] 0x62,0xd4,0x7c,0x0c,0x03,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: addl 291(%r8,%rax,4), %ecx, %edx # INTEL: add edx, ecx, dword ptr [r8 + 4*rax + 291] 0x62,0xd4,0x6c,0x18,0x03,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} addl 291(%r8,%rax,4), %ecx, %edx # INTEL: {nf} add edx, ecx, dword ptr [r8 + 4*rax + 291] 0x62,0xd4,0x6c,0x1c,0x03,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {evex} addq 291(%r8,%rax,4), %r9 # INTEL: {evex} add r9, qword ptr [r8 + 4*rax + 291] 0x62,0x54,0xfc,0x08,0x03,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} addq 291(%r8,%rax,4), %r9 # INTEL: {nf} add r9, qword ptr [r8 + 4*rax + 291] 0x62,0x54,0xfc,0x0c,0x03,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: addq 291(%r8,%rax,4), %r9, %r15 # INTEL: add r15, r9, qword ptr [r8 + 4*rax + 291] 0x62,0x54,0x84,0x18,0x03,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} addq 291(%r8,%rax,4), %r9, %r15 # INTEL: {nf} add r15, r9, qword ptr [r8 + 4*rax + 291] 0x62,0x54,0x84,0x1c,0x03,0x8c,0x80,0x23,0x01,0x00,0x00