# 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} subb $123, %bl # INTEL: {evex} sub bl, 123 0x62,0xf4,0x7c,0x08,0x80,0xeb,0x7b # ATT: {nf} subb $123, %bl # INTEL: {nf} sub bl, 123 0x62,0xf4,0x7c,0x0c,0x80,0xeb,0x7b # ATT: subb $123, %bl, %cl # INTEL: sub cl, bl, 123 0x62,0xf4,0x74,0x18,0x80,0xeb,0x7b # ATT: {nf} subb $123, %bl, %cl # INTEL: {nf} sub cl, bl, 123 0x62,0xf4,0x74,0x1c,0x80,0xeb,0x7b # ATT: {evex} subw $123, %dx # INTEL: {evex} sub dx, 123 0x62,0xf4,0x7d,0x08,0x83,0xea,0x7b # ATT: {nf} subw $123, %dx # INTEL: {nf} sub dx, 123 0x62,0xf4,0x7d,0x0c,0x83,0xea,0x7b # ATT: subw $123, %dx, %ax # INTEL: sub ax, dx, 123 0x62,0xf4,0x7d,0x18,0x83,0xea,0x7b # ATT: {nf} subw $123, %dx, %ax # INTEL: {nf} sub ax, dx, 123 0x62,0xf4,0x7d,0x1c,0x83,0xea,0x7b # ATT: {evex} subl $123, %ecx # INTEL: {evex} sub ecx, 123 0x62,0xf4,0x7c,0x08,0x83,0xe9,0x7b # ATT: {nf} subl $123, %ecx # INTEL: {nf} sub ecx, 123 0x62,0xf4,0x7c,0x0c,0x83,0xe9,0x7b # ATT: subl $123, %ecx, %edx # INTEL: sub edx, ecx, 123 0x62,0xf4,0x6c,0x18,0x83,0xe9,0x7b # ATT: {nf} subl $123, %ecx, %edx # INTEL: {nf} sub edx, ecx, 123 0x62,0xf4,0x6c,0x1c,0x83,0xe9,0x7b # ATT: {evex} subq $123, %r9 # INTEL: {evex} sub r9, 123 0x62,0xd4,0xfc,0x08,0x83,0xe9,0x7b # ATT: {nf} subq $123, %r9 # INTEL: {nf} sub r9, 123 0x62,0xd4,0xfc,0x0c,0x83,0xe9,0x7b # ATT: subq $123, %r9, %r15 # INTEL: sub r15, r9, 123 0x62,0xd4,0x84,0x18,0x83,0xe9,0x7b # ATT: {nf} subq $123, %r9, %r15 # INTEL: {nf} sub r15, r9, 123 0x62,0xd4,0x84,0x1c,0x83,0xe9,0x7b # ATT: {evex} subb $123, 291(%r8,%rax,4) # INTEL: {evex} sub byte ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x7c,0x08,0x80,0xac,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {nf} subb $123, 291(%r8,%rax,4) # INTEL: {nf} sub byte ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x7c,0x0c,0x80,0xac,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: subb $123, 291(%r8,%rax,4), %bl # INTEL: sub bl, byte ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x64,0x18,0x80,0xac,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {nf} subb $123, 291(%r8,%rax,4), %bl # INTEL: {nf} sub bl, byte ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x64,0x1c,0x80,0xac,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {evex} subw $123, 291(%r8,%rax,4) # INTEL: {evex} sub word ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x7d,0x08,0x83,0xac,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {nf} subw $123, 291(%r8,%rax,4) # INTEL: {nf} sub word ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x7d,0x0c,0x83,0xac,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: subw $123, 291(%r8,%rax,4), %dx # INTEL: sub dx, word ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x6d,0x18,0x83,0xac,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {nf} subw $123, 291(%r8,%rax,4), %dx # INTEL: {nf} sub dx, word ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x6d,0x1c,0x83,0xac,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {evex} subl $123, 291(%r8,%rax,4) # INTEL: {evex} sub dword ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x7c,0x08,0x83,0xac,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {nf} subl $123, 291(%r8,%rax,4) # INTEL: {nf} sub dword ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x7c,0x0c,0x83,0xac,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: subl $123, 291(%r8,%rax,4), %ecx # INTEL: sub ecx, dword ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x74,0x18,0x83,0xac,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {nf} subl $123, 291(%r8,%rax,4), %ecx # INTEL: {nf} sub ecx, dword ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0x74,0x1c,0x83,0xac,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {evex} subq $123, 291(%r8,%rax,4) # INTEL: {evex} sub qword ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0xfc,0x08,0x83,0xac,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {nf} subq $123, 291(%r8,%rax,4) # INTEL: {nf} sub qword ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0xfc,0x0c,0x83,0xac,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: subq $123, 291(%r8,%rax,4), %r9 # INTEL: sub r9, qword ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0xb4,0x18,0x83,0xac,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {nf} subq $123, 291(%r8,%rax,4), %r9 # INTEL: {nf} sub r9, qword ptr [r8 + 4*rax + 291], 123 0x62,0xd4,0xb4,0x1c,0x83,0xac,0x80,0x23,0x01,0x00,0x00,0x7b # ATT: {evex} subw $1234, %dx # INTEL: {evex} sub dx, 1234 0x62,0xf4,0x7d,0x08,0x81,0xea,0xd2,0x04 # ATT: {nf} subw $1234, %dx # INTEL: {nf} sub dx, 1234 0x62,0xf4,0x7d,0x0c,0x81,0xea,0xd2,0x04 # ATT: subw $1234, %dx, %ax # INTEL: sub ax, dx, 1234 0x62,0xf4,0x7d,0x18,0x81,0xea,0xd2,0x04 # ATT: {nf} subw $1234, %dx, %ax # INTEL: {nf} sub ax, dx, 1234 0x62,0xf4,0x7d,0x1c,0x81,0xea,0xd2,0x04 # ATT: {evex} subw $1234, 291(%r8,%rax,4) # INTEL: {evex} sub word ptr [r8 + 4*rax + 291], 1234 0x62,0xd4,0x7d,0x08,0x81,0xac,0x80,0x23,0x01,0x00,0x00,0xd2,0x04 # ATT: {nf} subw $1234, 291(%r8,%rax,4) # INTEL: {nf} sub word ptr [r8 + 4*rax + 291], 1234 0x62,0xd4,0x7d,0x0c,0x81,0xac,0x80,0x23,0x01,0x00,0x00,0xd2,0x04 # ATT: subw $1234, 291(%r8,%rax,4), %dx # INTEL: sub dx, word ptr [r8 + 4*rax + 291], 1234 0x62,0xd4,0x6d,0x18,0x81,0xac,0x80,0x23,0x01,0x00,0x00,0xd2,0x04 # ATT: {nf} subw $1234, 291(%r8,%rax,4), %dx # INTEL: {nf} sub dx, word ptr [r8 + 4*rax + 291], 1234 0x62,0xd4,0x6d,0x1c,0x81,0xac,0x80,0x23,0x01,0x00,0x00,0xd2,0x04 # ATT: {evex} subl $123456, %ecx # INTEL: {evex} sub ecx, 123456 0x62,0xf4,0x7c,0x08,0x81,0xe9,0x40,0xe2,0x01,0x00 # ATT: {nf} subl $123456, %ecx # INTEL: {nf} sub ecx, 123456 0x62,0xf4,0x7c,0x0c,0x81,0xe9,0x40,0xe2,0x01,0x00 # ATT: subl $123456, %ecx, %edx # INTEL: sub edx, ecx, 123456 0x62,0xf4,0x6c,0x18,0x81,0xe9,0x40,0xe2,0x01,0x00 # ATT: {nf} subl $123456, %ecx, %edx # INTEL: {nf} sub edx, ecx, 123456 0x62,0xf4,0x6c,0x1c,0x81,0xe9,0x40,0xe2,0x01,0x00 # ATT: {evex} subq $123456, %r9 # INTEL: {evex} sub r9, 123456 0x62,0xd4,0xfc,0x08,0x81,0xe9,0x40,0xe2,0x01,0x00 # ATT: {nf} subq $123456, %r9 # INTEL: {nf} sub r9, 123456 0x62,0xd4,0xfc,0x0c,0x81,0xe9,0x40,0xe2,0x01,0x00 # ATT: subq $123456, %r9, %r15 # INTEL: sub r15, r9, 123456 0x62,0xd4,0x84,0x18,0x81,0xe9,0x40,0xe2,0x01,0x00 # ATT: {nf} subq $123456, %r9, %r15 # INTEL: {nf} sub r15, r9, 123456 0x62,0xd4,0x84,0x1c,0x81,0xe9,0x40,0xe2,0x01,0x00 # ATT: {evex} subl $123456, 291(%r8,%rax,4) # INTEL: {evex} sub dword ptr [r8 + 4*rax + 291], 123456 0x62,0xd4,0x7c,0x08,0x81,0xac,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00 # ATT: {nf} subl $123456, 291(%r8,%rax,4) # INTEL: {nf} sub dword ptr [r8 + 4*rax + 291], 123456 0x62,0xd4,0x7c,0x0c,0x81,0xac,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00 # ATT: subl $123456, 291(%r8,%rax,4), %ecx # INTEL: sub ecx, dword ptr [r8 + 4*rax + 291], 123456 0x62,0xd4,0x74,0x18,0x81,0xac,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00 # ATT: {nf} subl $123456, 291(%r8,%rax,4), %ecx # INTEL: {nf} sub ecx, dword ptr [r8 + 4*rax + 291], 123456 0x62,0xd4,0x74,0x1c,0x81,0xac,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00 # ATT: {evex} subq $123456, 291(%r8,%rax,4) # INTEL: {evex} sub qword ptr [r8 + 4*rax + 291], 123456 0x62,0xd4,0xfc,0x08,0x81,0xac,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00 # ATT: {nf} subq $123456, 291(%r8,%rax,4) # INTEL: {nf} sub qword ptr [r8 + 4*rax + 291], 123456 0x62,0xd4,0xfc,0x0c,0x81,0xac,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00 # ATT: subq $123456, 291(%r8,%rax,4), %r9 # INTEL: sub r9, qword ptr [r8 + 4*rax + 291], 123456 0x62,0xd4,0xb4,0x18,0x81,0xac,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00 # ATT: {nf} subq $123456, 291(%r8,%rax,4), %r9 # INTEL: {nf} sub r9, qword ptr [r8 + 4*rax + 291], 123456 0x62,0xd4,0xb4,0x1c,0x81,0xac,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00 # ATT: {evex} subb %bl, %cl # INTEL: {evex} sub cl, bl 0x62,0xf4,0x7c,0x08,0x28,0xd9 # ATT: {nf} subb %bl, %cl # INTEL: {nf} sub cl, bl 0x62,0xf4,0x7c,0x0c,0x28,0xd9 # ATT: subb %bl, %cl, %r8b # INTEL: sub r8b, cl, bl 0x62,0xf4,0x3c,0x18,0x28,0xd9 # ATT: {nf} subb %bl, %cl, %r8b # INTEL: {nf} sub r8b, cl, bl 0x62,0xf4,0x3c,0x1c,0x28,0xd9 # ATT: {evex} subb %bl, 291(%r8,%rax,4) # INTEL: {evex} sub byte ptr [r8 + 4*rax + 291], bl 0x62,0xd4,0x7c,0x08,0x28,0x9c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} subb %bl, 291(%r8,%rax,4) # INTEL: {nf} sub byte ptr [r8 + 4*rax + 291], bl 0x62,0xd4,0x7c,0x0c,0x28,0x9c,0x80,0x23,0x01,0x00,0x00 # ATT: subb %bl, 291(%r8,%rax,4), %cl # INTEL: sub cl, byte ptr [r8 + 4*rax + 291], bl 0x62,0xd4,0x74,0x18,0x28,0x9c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} subb %bl, 291(%r8,%rax,4), %cl # INTEL: {nf} sub cl, byte ptr [r8 + 4*rax + 291], bl 0x62,0xd4,0x74,0x1c,0x28,0x9c,0x80,0x23,0x01,0x00,0x00 # ATT: {evex} subw %dx, %ax # INTEL: {evex} sub ax, dx 0x62,0xf4,0x7d,0x08,0x29,0xd0 # ATT: {nf} subw %dx, %ax # INTEL: {nf} sub ax, dx 0x62,0xf4,0x7d,0x0c,0x29,0xd0 # ATT: subw %dx, %ax, %r9w # INTEL: sub r9w, ax, dx 0x62,0xf4,0x35,0x18,0x29,0xd0 # ATT: {nf} subw %dx, %ax, %r9w # INTEL: {nf} sub r9w, ax, dx 0x62,0xf4,0x35,0x1c,0x29,0xd0 # ATT: {evex} subw %dx, 291(%r8,%rax,4) # INTEL: {evex} sub word ptr [r8 + 4*rax + 291], dx 0x62,0xd4,0x7d,0x08,0x29,0x94,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} subw %dx, 291(%r8,%rax,4) # INTEL: {nf} sub word ptr [r8 + 4*rax + 291], dx 0x62,0xd4,0x7d,0x0c,0x29,0x94,0x80,0x23,0x01,0x00,0x00 # ATT: subw %dx, 291(%r8,%rax,4), %ax # INTEL: sub ax, word ptr [r8 + 4*rax + 291], dx 0x62,0xd4,0x7d,0x18,0x29,0x94,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} subw %dx, 291(%r8,%rax,4), %ax # INTEL: {nf} sub ax, word ptr [r8 + 4*rax + 291], dx 0x62,0xd4,0x7d,0x1c,0x29,0x94,0x80,0x23,0x01,0x00,0x00 # ATT: {evex} subl %ecx, %edx # INTEL: {evex} sub edx, ecx 0x62,0xf4,0x7c,0x08,0x29,0xca # ATT: {nf} subl %ecx, %edx # INTEL: {nf} sub edx, ecx 0x62,0xf4,0x7c,0x0c,0x29,0xca # ATT: subl %ecx, %edx, %r10d # INTEL: sub r10d, edx, ecx 0x62,0xf4,0x2c,0x18,0x29,0xca # ATT: {nf} subl %ecx, %edx, %r10d # INTEL: {nf} sub r10d, edx, ecx 0x62,0xf4,0x2c,0x1c,0x29,0xca # ATT: {evex} subl %ecx, 291(%r8,%rax,4) # INTEL: {evex} sub dword ptr [r8 + 4*rax + 291], ecx 0x62,0xd4,0x7c,0x08,0x29,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} subl %ecx, 291(%r8,%rax,4) # INTEL: {nf} sub dword ptr [r8 + 4*rax + 291], ecx 0x62,0xd4,0x7c,0x0c,0x29,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: subl %ecx, 291(%r8,%rax,4), %edx # INTEL: sub edx, dword ptr [r8 + 4*rax + 291], ecx 0x62,0xd4,0x6c,0x18,0x29,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} subl %ecx, 291(%r8,%rax,4), %edx # INTEL: {nf} sub edx, dword ptr [r8 + 4*rax + 291], ecx 0x62,0xd4,0x6c,0x1c,0x29,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {evex} subq %r9, %r15 # INTEL: {evex} sub r15, r9 0x62,0x54,0xfc,0x08,0x29,0xcf # ATT: {nf} subq %r9, %r15 # INTEL: {nf} sub r15, r9 0x62,0x54,0xfc,0x0c,0x29,0xcf # ATT: subq %r9, %r15, %r11 # INTEL: sub r11, r15, r9 0x62,0x54,0xa4,0x18,0x29,0xcf # ATT: {nf} subq %r9, %r15, %r11 # INTEL: {nf} sub r11, r15, r9 0x62,0x54,0xa4,0x1c,0x29,0xcf # ATT: {evex} subq %r9, 291(%r8,%rax,4) # INTEL: {evex} sub qword ptr [r8 + 4*rax + 291], r9 0x62,0x54,0xfc,0x08,0x29,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} subq %r9, 291(%r8,%rax,4) # INTEL: {nf} sub qword ptr [r8 + 4*rax + 291], r9 0x62,0x54,0xfc,0x0c,0x29,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: subq %r9, 291(%r8,%rax,4), %r15 # INTEL: sub r15, qword ptr [r8 + 4*rax + 291], r9 0x62,0x54,0x84,0x18,0x29,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} subq %r9, 291(%r8,%rax,4), %r15 # INTEL: {nf} sub r15, qword ptr [r8 + 4*rax + 291], r9 0x62,0x54,0x84,0x1c,0x29,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {evex} subb 291(%r8,%rax,4), %bl # INTEL: {evex} sub bl, byte ptr [r8 + 4*rax + 291] 0x62,0xd4,0x7c,0x08,0x2a,0x9c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} subb 291(%r8,%rax,4), %bl # INTEL: {nf} sub bl, byte ptr [r8 + 4*rax + 291] 0x62,0xd4,0x7c,0x0c,0x2a,0x9c,0x80,0x23,0x01,0x00,0x00 # ATT: subb 291(%r8,%rax,4), %bl, %cl # INTEL: sub cl, bl, byte ptr [r8 + 4*rax + 291] 0x62,0xd4,0x74,0x18,0x2a,0x9c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} subb 291(%r8,%rax,4), %bl, %cl # INTEL: {nf} sub cl, bl, byte ptr [r8 + 4*rax + 291] 0x62,0xd4,0x74,0x1c,0x2a,0x9c,0x80,0x23,0x01,0x00,0x00 # ATT: {evex} subw 291(%r8,%rax,4), %dx # INTEL: {evex} sub dx, word ptr [r8 + 4*rax + 291] 0x62,0xd4,0x7d,0x08,0x2b,0x94,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} subw 291(%r8,%rax,4), %dx # INTEL: {nf} sub dx, word ptr [r8 + 4*rax + 291] 0x62,0xd4,0x7d,0x0c,0x2b,0x94,0x80,0x23,0x01,0x00,0x00 # ATT: subw 291(%r8,%rax,4), %dx, %ax # INTEL: sub ax, dx, word ptr [r8 + 4*rax + 291] 0x62,0xd4,0x7d,0x18,0x2b,0x94,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} subw 291(%r8,%rax,4), %dx, %ax # INTEL: {nf} sub ax, dx, word ptr [r8 + 4*rax + 291] 0x62,0xd4,0x7d,0x1c,0x2b,0x94,0x80,0x23,0x01,0x00,0x00 # ATT: {evex} subl 291(%r8,%rax,4), %ecx # INTEL: {evex} sub ecx, dword ptr [r8 + 4*rax + 291] 0x62,0xd4,0x7c,0x08,0x2b,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} subl 291(%r8,%rax,4), %ecx # INTEL: {nf} sub ecx, dword ptr [r8 + 4*rax + 291] 0x62,0xd4,0x7c,0x0c,0x2b,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: subl 291(%r8,%rax,4), %ecx, %edx # INTEL: sub edx, ecx, dword ptr [r8 + 4*rax + 291] 0x62,0xd4,0x6c,0x18,0x2b,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} subl 291(%r8,%rax,4), %ecx, %edx # INTEL: {nf} sub edx, ecx, dword ptr [r8 + 4*rax + 291] 0x62,0xd4,0x6c,0x1c,0x2b,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {evex} subq 291(%r8,%rax,4), %r9 # INTEL: {evex} sub r9, qword ptr [r8 + 4*rax + 291] 0x62,0x54,0xfc,0x08,0x2b,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} subq 291(%r8,%rax,4), %r9 # INTEL: {nf} sub r9, qword ptr [r8 + 4*rax + 291] 0x62,0x54,0xfc,0x0c,0x2b,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: subq 291(%r8,%rax,4), %r9, %r15 # INTEL: sub r15, r9, qword ptr [r8 + 4*rax + 291] 0x62,0x54,0x84,0x18,0x2b,0x8c,0x80,0x23,0x01,0x00,0x00 # ATT: {nf} subq 291(%r8,%rax,4), %r9, %r15 # INTEL: {nf} sub r15, r9, qword ptr [r8 + 4*rax + 291] 0x62,0x54,0x84,0x1c,0x2b,0x8c,0x80,0x23,0x01,0x00,0x00