# 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} rorb $123, %bl
# INTEL: {evex} ror bl, 123
0x62,0xf4,0x7c,0x08,0xc0,0xcb,0x7b
# ATT: {nf} rorb $123, %bl
# INTEL: {nf} ror bl, 123
0x62,0xf4,0x7c,0x0c,0xc0,0xcb,0x7b
# ATT: rorb $123, %bl, %bl
# INTEL: ror bl, bl, 123
0x62,0xf4,0x64,0x18,0xc0,0xcb,0x7b
# ATT: {nf} rorb $123, %bl, %bl
# INTEL: {nf} ror bl, bl, 123
0x62,0xf4,0x64,0x1c,0xc0,0xcb,0x7b
# ATT: {evex} rorw $123, %dx
# INTEL: {evex} ror dx, 123
0x62,0xf4,0x7d,0x08,0xc1,0xca,0x7b
# ATT: {nf} rorw $123, %dx
# INTEL: {nf} ror dx, 123
0x62,0xf4,0x7d,0x0c,0xc1,0xca,0x7b
# ATT: rorw $123, %dx, %dx
# INTEL: ror dx, dx, 123
0x62,0xf4,0x6d,0x18,0xc1,0xca,0x7b
# ATT: {nf} rorw $123, %dx, %dx
# INTEL: {nf} ror dx, dx, 123
0x62,0xf4,0x6d,0x1c,0xc1,0xca,0x7b
# ATT: {evex} rorl $123, %ecx
# INTEL: {evex} ror ecx, 123
0x62,0xf4,0x7c,0x08,0xc1,0xc9,0x7b
# ATT: {nf} rorl $123, %ecx
# INTEL: {nf} ror ecx, 123
0x62,0xf4,0x7c,0x0c,0xc1,0xc9,0x7b
# ATT: rorl $123, %ecx, %ecx
# INTEL: ror ecx, ecx, 123
0x62,0xf4,0x74,0x18,0xc1,0xc9,0x7b
# ATT: {nf} rorl $123, %ecx, %ecx
# INTEL: {nf} ror ecx, ecx, 123
0x62,0xf4,0x74,0x1c,0xc1,0xc9,0x7b
# ATT: {evex} rorq $123, %r9
# INTEL: {evex} ror r9, 123
0x62,0xd4,0xfc,0x08,0xc1,0xc9,0x7b
# ATT: {nf} rorq $123, %r9
# INTEL: {nf} ror r9, 123
0x62,0xd4,0xfc,0x0c,0xc1,0xc9,0x7b
# ATT: rorq $123, %r9, %r9
# INTEL: ror r9, r9, 123
0x62,0xd4,0xb4,0x18,0xc1,0xc9,0x7b
# ATT: {nf} rorq $123, %r9, %r9
# INTEL: {nf} ror r9, r9, 123
0x62,0xd4,0xb4,0x1c,0xc1,0xc9,0x7b
# ATT: {evex} rorb $123, 291(%r8,%rax,4)
# INTEL: {evex} ror byte ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0x7c,0x08,0xc0,0x8c,0x80,0x23,0x01,0x00,0x00,0x7b
# ATT: {nf} rorb $123, 291(%r8,%rax,4)
# INTEL: {nf} ror byte ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0x7c,0x0c,0xc0,0x8c,0x80,0x23,0x01,0x00,0x00,0x7b
# ATT: rorb $123, 291(%r8,%rax,4), %bl
# INTEL: ror bl, byte ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0x64,0x18,0xc0,0x8c,0x80,0x23,0x01,0x00,0x00,0x7b
# ATT: {nf} rorb $123, 291(%r8,%rax,4), %bl
# INTEL: {nf} ror bl, byte ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0x64,0x1c,0xc0,0x8c,0x80,0x23,0x01,0x00,0x00,0x7b
# ATT: {evex} rorw $123, 291(%r8,%rax,4)
# INTEL: {evex} ror word ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0x7d,0x08,0xc1,0x8c,0x80,0x23,0x01,0x00,0x00,0x7b
# ATT: {nf} rorw $123, 291(%r8,%rax,4)
# INTEL: {nf} ror word ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0x7d,0x0c,0xc1,0x8c,0x80,0x23,0x01,0x00,0x00,0x7b
# ATT: rorw $123, 291(%r8,%rax,4), %dx
# INTEL: ror dx, word ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0x6d,0x18,0xc1,0x8c,0x80,0x23,0x01,0x00,0x00,0x7b
# ATT: {nf} rorw $123, 291(%r8,%rax,4), %dx
# INTEL: {nf} ror dx, word ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0x6d,0x1c,0xc1,0x8c,0x80,0x23,0x01,0x00,0x00,0x7b
# ATT: {evex} rorl $123, 291(%r8,%rax,4)
# INTEL: {evex} ror dword ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0x7c,0x08,0xc1,0x8c,0x80,0x23,0x01,0x00,0x00,0x7b
# ATT: {nf} rorl $123, 291(%r8,%rax,4)
# INTEL: {nf} ror dword ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0x7c,0x0c,0xc1,0x8c,0x80,0x23,0x01,0x00,0x00,0x7b
# ATT: rorl $123, 291(%r8,%rax,4), %ecx
# INTEL: ror ecx, dword ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0x74,0x18,0xc1,0x8c,0x80,0x23,0x01,0x00,0x00,0x7b
# ATT: {nf} rorl $123, 291(%r8,%rax,4), %ecx
# INTEL: {nf} ror ecx, dword ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0x74,0x1c,0xc1,0x8c,0x80,0x23,0x01,0x00,0x00,0x7b
# ATT: {evex} rorq $123, 291(%r8,%rax,4)
# INTEL: {evex} ror qword ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0xfc,0x08,0xc1,0x8c,0x80,0x23,0x01,0x00,0x00,0x7b
# ATT: {nf} rorq $123, 291(%r8,%rax,4)
# INTEL: {nf} ror qword ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0xfc,0x0c,0xc1,0x8c,0x80,0x23,0x01,0x00,0x00,0x7b
# ATT: rorq $123, 291(%r8,%rax,4), %r9
# INTEL: ror r9, qword ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0xb4,0x18,0xc1,0x8c,0x80,0x23,0x01,0x00,0x00,0x7b
# ATT: {nf} rorq $123, 291(%r8,%rax,4), %r9
# INTEL: {nf} ror r9, qword ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0xb4,0x1c,0xc1,0x8c,0x80,0x23,0x01,0x00,0x00,0x7b
# ATT: {evex} rorb %bl
# INTEL: {evex} ror bl
0x62,0xf4,0x7c,0x08,0xd0,0xcb
# ATT: {nf} rorb %bl
# INTEL: {nf} ror bl
0x62,0xf4,0x7c,0x0c,0xd0,0xcb
# ATT: rorb %bl, %bl
# INTEL: ror bl, bl
0x62,0xf4,0x64,0x18,0xd0,0xcb
# ATT: {nf} rorb %bl, %bl
# INTEL: {nf} ror bl, bl
0x62,0xf4,0x64,0x1c,0xd0,0xcb
# ATT: {evex} rorb %cl, %bl
# INTEL: {evex} ror bl, cl
0x62,0xf4,0x7c,0x08,0xd2,0xcb
# ATT: {nf} rorb %cl, %bl
# INTEL: {nf} ror bl, cl
0x62,0xf4,0x7c,0x0c,0xd2,0xcb
# ATT: rorb %cl, %bl, %bl
# INTEL: ror bl, bl, cl
0x62,0xf4,0x64,0x18,0xd2,0xcb
# ATT: {nf} rorb %cl, %bl, %bl
# INTEL: {nf} ror bl, bl, cl
0x62,0xf4,0x64,0x1c,0xd2,0xcb
# ATT: {evex} rorw %cl, %dx
# INTEL: {evex} ror dx, cl
0x62,0xf4,0x7d,0x08,0xd3,0xca
# ATT: {nf} rorw %cl, %dx
# INTEL: {nf} ror dx, cl
0x62,0xf4,0x7d,0x0c,0xd3,0xca
# ATT: rorw %cl, %dx, %dx
# INTEL: ror dx, dx, cl
0x62,0xf4,0x6d,0x18,0xd3,0xca
# ATT: {nf} rorw %cl, %dx, %dx
# INTEL: {nf} ror dx, dx, cl
0x62,0xf4,0x6d,0x1c,0xd3,0xca
# ATT: {evex} rorl %cl, %ecx
# INTEL: {evex} ror ecx, cl
0x62,0xf4,0x7c,0x08,0xd3,0xc9
# ATT: {nf} rorl %cl, %ecx
# INTEL: {nf} ror ecx, cl
0x62,0xf4,0x7c,0x0c,0xd3,0xc9
# ATT: rorl %cl, %ecx, %ecx
# INTEL: ror ecx, ecx, cl
0x62,0xf4,0x74,0x18,0xd3,0xc9
# ATT: {nf} rorl %cl, %ecx, %ecx
# INTEL: {nf} ror ecx, ecx, cl
0x62,0xf4,0x74,0x1c,0xd3,0xc9
# ATT: {evex} rorq %cl, %r9
# INTEL: {evex} ror r9, cl
0x62,0xd4,0xfc,0x08,0xd3,0xc9
# ATT: {nf} rorq %cl, %r9
# INTEL: {nf} ror r9, cl
0x62,0xd4,0xfc,0x0c,0xd3,0xc9
# ATT: rorq %cl, %r9, %r9
# INTEL: ror r9, r9, cl
0x62,0xd4,0xb4,0x18,0xd3,0xc9
# ATT: {nf} rorq %cl, %r9, %r9
# INTEL: {nf} ror r9, r9, cl
0x62,0xd4,0xb4,0x1c,0xd3,0xc9
# ATT: {evex} rorb %cl, 291(%r8,%rax,4)
# INTEL: {evex} ror byte ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0x7c,0x08,0xd2,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: {nf} rorb %cl, 291(%r8,%rax,4)
# INTEL: {nf} ror byte ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0x7c,0x0c,0xd2,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: rorb %cl, 291(%r8,%rax,4), %bl
# INTEL: ror bl, byte ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0x64,0x18,0xd2,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: {nf} rorb %cl, 291(%r8,%rax,4), %bl
# INTEL: {nf} ror bl, byte ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0x64,0x1c,0xd2,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: {evex} rorw %cl, 291(%r8,%rax,4)
# INTEL: {evex} ror word ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0x7d,0x08,0xd3,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: {nf} rorw %cl, 291(%r8,%rax,4)
# INTEL: {nf} ror word ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0x7d,0x0c,0xd3,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: rorw %cl, 291(%r8,%rax,4), %dx
# INTEL: ror dx, word ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0x6d,0x18,0xd3,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: {nf} rorw %cl, 291(%r8,%rax,4), %dx
# INTEL: {nf} ror dx, word ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0x6d,0x1c,0xd3,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: {evex} rorl %cl, 291(%r8,%rax,4)
# INTEL: {evex} ror dword ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0x7c,0x08,0xd3,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: {nf} rorl %cl, 291(%r8,%rax,4)
# INTEL: {nf} ror dword ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0x7c,0x0c,0xd3,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: rorl %cl, 291(%r8,%rax,4), %ecx
# INTEL: ror ecx, dword ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0x74,0x18,0xd3,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: {nf} rorl %cl, 291(%r8,%rax,4), %ecx
# INTEL: {nf} ror ecx, dword ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0x74,0x1c,0xd3,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: {evex} rorq %cl, 291(%r8,%rax,4)
# INTEL: {evex} ror qword ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0xfc,0x08,0xd3,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: {nf} rorq %cl, 291(%r8,%rax,4)
# INTEL: {nf} ror qword ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0xfc,0x0c,0xd3,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: rorq %cl, 291(%r8,%rax,4), %r9
# INTEL: ror r9, qword ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0xb4,0x18,0xd3,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: {nf} rorq %cl, 291(%r8,%rax,4), %r9
# INTEL: {nf} ror r9, qword ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0xb4,0x1c,0xd3,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: {evex} rorw %dx
# INTEL: {evex} ror dx
0x62,0xf4,0x7d,0x08,0xd1,0xca
# ATT: {nf} rorw %dx
# INTEL: {nf} ror dx
0x62,0xf4,0x7d,0x0c,0xd1,0xca
# ATT: rorw %dx, %dx
# INTEL: ror dx, dx
0x62,0xf4,0x6d,0x18,0xd1,0xca
# ATT: {nf} rorw %dx, %dx
# INTEL: {nf} ror dx, dx
0x62,0xf4,0x6d,0x1c,0xd1,0xca
# ATT: {evex} rorl %ecx
# INTEL: {evex} ror ecx
0x62,0xf4,0x7c,0x08,0xd1,0xc9
# ATT: {nf} rorl %ecx
# INTEL: {nf} ror ecx
0x62,0xf4,0x7c,0x0c,0xd1,0xc9
# ATT: rorl %ecx, %ecx
# INTEL: ror ecx, ecx
0x62,0xf4,0x74,0x18,0xd1,0xc9
# ATT: {nf} rorl %ecx, %ecx
# INTEL: {nf} ror ecx, ecx
0x62,0xf4,0x74,0x1c,0xd1,0xc9
# ATT: {evex} rorq %r9
# INTEL: {evex} ror r9
0x62,0xd4,0xfc,0x08,0xd1,0xc9
# ATT: {nf} rorq %r9
# INTEL: {nf} ror r9
0x62,0xd4,0xfc,0x0c,0xd1,0xc9
# ATT: rorq %r9, %r9
# INTEL: ror r9, r9
0x62,0xd4,0xb4,0x18,0xd1,0xc9
# ATT: {nf} rorq %r9, %r9
# INTEL: {nf} ror r9, r9
0x62,0xd4,0xb4,0x1c,0xd1,0xc9
# ATT: {evex} rorb 291(%r8,%rax,4)
# INTEL: {evex} ror byte ptr [r8 + 4*rax + 291]
0x62,0xd4,0x7c,0x08,0xd0,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: {nf} rorb 291(%r8,%rax,4)
# INTEL: {nf} ror byte ptr [r8 + 4*rax + 291]
0x62,0xd4,0x7c,0x0c,0xd0,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: rorb 291(%r8,%rax,4), %bl
# INTEL: ror bl, byte ptr [r8 + 4*rax + 291]
0x62,0xd4,0x64,0x18,0xd0,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: {nf} rorb 291(%r8,%rax,4), %bl
# INTEL: {nf} ror bl, byte ptr [r8 + 4*rax + 291]
0x62,0xd4,0x64,0x1c,0xd0,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: {evex} rorw 291(%r8,%rax,4)
# INTEL: {evex} ror word ptr [r8 + 4*rax + 291]
0x62,0xd4,0x7d,0x08,0xd1,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: {nf} rorw 291(%r8,%rax,4)
# INTEL: {nf} ror word ptr [r8 + 4*rax + 291]
0x62,0xd4,0x7d,0x0c,0xd1,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: rorw 291(%r8,%rax,4), %dx
# INTEL: ror dx, word ptr [r8 + 4*rax + 291]
0x62,0xd4,0x6d,0x18,0xd1,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: {nf} rorw 291(%r8,%rax,4), %dx
# INTEL: {nf} ror dx, word ptr [r8 + 4*rax + 291]
0x62,0xd4,0x6d,0x1c,0xd1,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: {evex} rorl 291(%r8,%rax,4)
# INTEL: {evex} ror dword ptr [r8 + 4*rax + 291]
0x62,0xd4,0x7c,0x08,0xd1,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: {nf} rorl 291(%r8,%rax,4)
# INTEL: {nf} ror dword ptr [r8 + 4*rax + 291]
0x62,0xd4,0x7c,0x0c,0xd1,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: rorl 291(%r8,%rax,4), %ecx
# INTEL: ror ecx, dword ptr [r8 + 4*rax + 291]
0x62,0xd4,0x74,0x18,0xd1,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: {nf} rorl 291(%r8,%rax,4), %ecx
# INTEL: {nf} ror ecx, dword ptr [r8 + 4*rax + 291]
0x62,0xd4,0x74,0x1c,0xd1,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: {evex} rorq 291(%r8,%rax,4)
# INTEL: {evex} ror qword ptr [r8 + 4*rax + 291]
0x62,0xd4,0xfc,0x08,0xd1,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: {nf} rorq 291(%r8,%rax,4)
# INTEL: {nf} ror qword ptr [r8 + 4*rax + 291]
0x62,0xd4,0xfc,0x0c,0xd1,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: rorq 291(%r8,%rax,4), %r9
# INTEL: ror r9, qword ptr [r8 + 4*rax + 291]
0x62,0xd4,0xb4,0x18,0xd1,0x8c,0x80,0x23,0x01,0x00,0x00
# ATT: {nf} rorq 291(%r8,%rax,4), %r9
# INTEL: {nf} ror r9, qword ptr [r8 + 4*rax + 291]
0x62,0xd4,0xb4,0x1c,0xd1,0x8c,0x80,0x23,0x01,0x00,0x00