llvm/llvm/test/MC/Disassembler/X86/apx/sar.txt

# 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}	sarb	$123, %bl
# INTEL: {evex}	sar	bl, 123
0x62,0xf4,0x7c,0x08,0xc0,0xfb,0x7b

# ATT:   {nf}	sarb	$123, %bl
# INTEL: {nf}	sar	bl, 123
0x62,0xf4,0x7c,0x0c,0xc0,0xfb,0x7b

# ATT:   sarb	$123, %bl, %bl
# INTEL: sar	bl, bl, 123
0x62,0xf4,0x64,0x18,0xc0,0xfb,0x7b

# ATT:   {nf}	sarb	$123, %bl, %bl
# INTEL: {nf}	sar	bl, bl, 123
0x62,0xf4,0x64,0x1c,0xc0,0xfb,0x7b

# ATT:   {evex}	sarw	$123, %dx
# INTEL: {evex}	sar	dx, 123
0x62,0xf4,0x7d,0x08,0xc1,0xfa,0x7b

# ATT:   {nf}	sarw	$123, %dx
# INTEL: {nf}	sar	dx, 123
0x62,0xf4,0x7d,0x0c,0xc1,0xfa,0x7b

# ATT:   sarw	$123, %dx, %dx
# INTEL: sar	dx, dx, 123
0x62,0xf4,0x6d,0x18,0xc1,0xfa,0x7b

# ATT:   {nf}	sarw	$123, %dx, %dx
# INTEL: {nf}	sar	dx, dx, 123
0x62,0xf4,0x6d,0x1c,0xc1,0xfa,0x7b

# ATT:   {evex}	sarl	$123, %ecx
# INTEL: {evex}	sar	ecx, 123
0x62,0xf4,0x7c,0x08,0xc1,0xf9,0x7b

# ATT:   {nf}	sarl	$123, %ecx
# INTEL: {nf}	sar	ecx, 123
0x62,0xf4,0x7c,0x0c,0xc1,0xf9,0x7b

# ATT:   sarl	$123, %ecx, %ecx
# INTEL: sar	ecx, ecx, 123
0x62,0xf4,0x74,0x18,0xc1,0xf9,0x7b

# ATT:   {nf}	sarl	$123, %ecx, %ecx
# INTEL: {nf}	sar	ecx, ecx, 123
0x62,0xf4,0x74,0x1c,0xc1,0xf9,0x7b

# ATT:   {evex}	sarq	$123, %r9
# INTEL: {evex}	sar	r9, 123
0x62,0xd4,0xfc,0x08,0xc1,0xf9,0x7b

# ATT:   {nf}	sarq	$123, %r9
# INTEL: {nf}	sar	r9, 123
0x62,0xd4,0xfc,0x0c,0xc1,0xf9,0x7b

# ATT:   sarq	$123, %r9, %r9
# INTEL: sar	r9, r9, 123
0x62,0xd4,0xb4,0x18,0xc1,0xf9,0x7b

# ATT:   {nf}	sarq	$123, %r9, %r9
# INTEL: {nf}	sar	r9, r9, 123
0x62,0xd4,0xb4,0x1c,0xc1,0xf9,0x7b

# ATT:   {evex}	sarb	$123, 291(%r8,%rax,4)
# INTEL: {evex}	sar	byte ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0x7c,0x08,0xc0,0xbc,0x80,0x23,0x01,0x00,0x00,0x7b

# ATT:   {nf}	sarb	$123, 291(%r8,%rax,4)
# INTEL: {nf}	sar	byte ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0x7c,0x0c,0xc0,0xbc,0x80,0x23,0x01,0x00,0x00,0x7b

# ATT:   sarb	$123, 291(%r8,%rax,4), %bl
# INTEL: sar	bl, byte ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0x64,0x18,0xc0,0xbc,0x80,0x23,0x01,0x00,0x00,0x7b

# ATT:   {nf}	sarb	$123, 291(%r8,%rax,4), %bl
# INTEL: {nf}	sar	bl, byte ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0x64,0x1c,0xc0,0xbc,0x80,0x23,0x01,0x00,0x00,0x7b

# ATT:   {evex}	sarw	$123, 291(%r8,%rax,4)
# INTEL: {evex}	sar	word ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0x7d,0x08,0xc1,0xbc,0x80,0x23,0x01,0x00,0x00,0x7b

# ATT:   {nf}	sarw	$123, 291(%r8,%rax,4)
# INTEL: {nf}	sar	word ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0x7d,0x0c,0xc1,0xbc,0x80,0x23,0x01,0x00,0x00,0x7b

# ATT:   sarw	$123, 291(%r8,%rax,4), %dx
# INTEL: sar	dx, word ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0x6d,0x18,0xc1,0xbc,0x80,0x23,0x01,0x00,0x00,0x7b

# ATT:   {nf}	sarw	$123, 291(%r8,%rax,4), %dx
# INTEL: {nf}	sar	dx, word ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0x6d,0x1c,0xc1,0xbc,0x80,0x23,0x01,0x00,0x00,0x7b

# ATT:   {evex}	sarl	$123, 291(%r8,%rax,4)
# INTEL: {evex}	sar	dword ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0x7c,0x08,0xc1,0xbc,0x80,0x23,0x01,0x00,0x00,0x7b

# ATT:   {nf}	sarl	$123, 291(%r8,%rax,4)
# INTEL: {nf}	sar	dword ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0x7c,0x0c,0xc1,0xbc,0x80,0x23,0x01,0x00,0x00,0x7b

# ATT:   sarl	$123, 291(%r8,%rax,4), %ecx
# INTEL: sar	ecx, dword ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0x74,0x18,0xc1,0xbc,0x80,0x23,0x01,0x00,0x00,0x7b

# ATT:   {nf}	sarl	$123, 291(%r8,%rax,4), %ecx
# INTEL: {nf}	sar	ecx, dword ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0x74,0x1c,0xc1,0xbc,0x80,0x23,0x01,0x00,0x00,0x7b

# ATT:   {evex}	sarq	$123, 291(%r8,%rax,4)
# INTEL: {evex}	sar	qword ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0xfc,0x08,0xc1,0xbc,0x80,0x23,0x01,0x00,0x00,0x7b

# ATT:   {nf}	sarq	$123, 291(%r8,%rax,4)
# INTEL: {nf}	sar	qword ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0xfc,0x0c,0xc1,0xbc,0x80,0x23,0x01,0x00,0x00,0x7b

# ATT:   sarq	$123, 291(%r8,%rax,4), %r9
# INTEL: sar	r9, qword ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0xb4,0x18,0xc1,0xbc,0x80,0x23,0x01,0x00,0x00,0x7b

# ATT:   {nf}	sarq	$123, 291(%r8,%rax,4), %r9
# INTEL: {nf}	sar	r9, qword ptr [r8 + 4*rax + 291], 123
0x62,0xd4,0xb4,0x1c,0xc1,0xbc,0x80,0x23,0x01,0x00,0x00,0x7b

# ATT:   {evex}	sarb	%bl
# INTEL: {evex}	sar	bl
0x62,0xf4,0x7c,0x08,0xd0,0xfb

# ATT:   {nf}	sarb	%bl
# INTEL: {nf}	sar	bl
0x62,0xf4,0x7c,0x0c,0xd0,0xfb

# ATT:   sarb	%bl, %bl
# INTEL: sar	bl, bl
0x62,0xf4,0x64,0x18,0xd0,0xfb

# ATT:   {nf}	sarb	%bl, %bl
# INTEL: {nf}	sar	bl, bl
0x62,0xf4,0x64,0x1c,0xd0,0xfb

# ATT:   {evex}	sarb	%cl, %bl
# INTEL: {evex}	sar	bl, cl
0x62,0xf4,0x7c,0x08,0xd2,0xfb

# ATT:   {nf}	sarb	%cl, %bl
# INTEL: {nf}	sar	bl, cl
0x62,0xf4,0x7c,0x0c,0xd2,0xfb

# ATT:   sarb	%cl, %bl, %bl
# INTEL: sar	bl, bl, cl
0x62,0xf4,0x64,0x18,0xd2,0xfb

# ATT:   {nf}	sarb	%cl, %bl, %bl
# INTEL: {nf}	sar	bl, bl, cl
0x62,0xf4,0x64,0x1c,0xd2,0xfb

# ATT:   {evex}	sarw	%cl, %dx
# INTEL: {evex}	sar	dx, cl
0x62,0xf4,0x7d,0x08,0xd3,0xfa

# ATT:   {nf}	sarw	%cl, %dx
# INTEL: {nf}	sar	dx, cl
0x62,0xf4,0x7d,0x0c,0xd3,0xfa

# ATT:   sarw	%cl, %dx, %dx
# INTEL: sar	dx, dx, cl
0x62,0xf4,0x6d,0x18,0xd3,0xfa

# ATT:   {nf}	sarw	%cl, %dx, %dx
# INTEL: {nf}	sar	dx, dx, cl
0x62,0xf4,0x6d,0x1c,0xd3,0xfa

# ATT:   {evex}	sarl	%cl, %ecx
# INTEL: {evex}	sar	ecx, cl
0x62,0xf4,0x7c,0x08,0xd3,0xf9

# ATT:   {nf}	sarl	%cl, %ecx
# INTEL: {nf}	sar	ecx, cl
0x62,0xf4,0x7c,0x0c,0xd3,0xf9

# ATT:   sarl	%cl, %ecx, %ecx
# INTEL: sar	ecx, ecx, cl
0x62,0xf4,0x74,0x18,0xd3,0xf9

# ATT:   {nf}	sarl	%cl, %ecx, %ecx
# INTEL: {nf}	sar	ecx, ecx, cl
0x62,0xf4,0x74,0x1c,0xd3,0xf9

# ATT:   {evex}	sarq	%cl, %r9
# INTEL: {evex}	sar	r9, cl
0x62,0xd4,0xfc,0x08,0xd3,0xf9

# ATT:   {nf}	sarq	%cl, %r9
# INTEL: {nf}	sar	r9, cl
0x62,0xd4,0xfc,0x0c,0xd3,0xf9

# ATT:   sarq	%cl, %r9, %r9
# INTEL: sar	r9, r9, cl
0x62,0xd4,0xb4,0x18,0xd3,0xf9

# ATT:   {nf}	sarq	%cl, %r9, %r9
# INTEL: {nf}	sar	r9, r9, cl
0x62,0xd4,0xb4,0x1c,0xd3,0xf9

# ATT:   {evex}	sarb	%cl, 291(%r8,%rax,4)
# INTEL: {evex}	sar	byte ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0x7c,0x08,0xd2,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   {nf}	sarb	%cl, 291(%r8,%rax,4)
# INTEL: {nf}	sar	byte ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0x7c,0x0c,0xd2,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   sarb	%cl, 291(%r8,%rax,4), %bl
# INTEL: sar	bl, byte ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0x64,0x18,0xd2,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   {nf}	sarb	%cl, 291(%r8,%rax,4), %bl
# INTEL: {nf}	sar	bl, byte ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0x64,0x1c,0xd2,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   {evex}	sarw	%cl, 291(%r8,%rax,4)
# INTEL: {evex}	sar	word ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0x7d,0x08,0xd3,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   {nf}	sarw	%cl, 291(%r8,%rax,4)
# INTEL: {nf}	sar	word ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0x7d,0x0c,0xd3,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   sarw	%cl, 291(%r8,%rax,4), %dx
# INTEL: sar	dx, word ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0x6d,0x18,0xd3,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   {nf}	sarw	%cl, 291(%r8,%rax,4), %dx
# INTEL: {nf}	sar	dx, word ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0x6d,0x1c,0xd3,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   {evex}	sarl	%cl, 291(%r8,%rax,4)
# INTEL: {evex}	sar	dword ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0x7c,0x08,0xd3,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   {nf}	sarl	%cl, 291(%r8,%rax,4)
# INTEL: {nf}	sar	dword ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0x7c,0x0c,0xd3,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   sarl	%cl, 291(%r8,%rax,4), %ecx
# INTEL: sar	ecx, dword ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0x74,0x18,0xd3,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   {nf}	sarl	%cl, 291(%r8,%rax,4), %ecx
# INTEL: {nf}	sar	ecx, dword ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0x74,0x1c,0xd3,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   {evex}	sarq	%cl, 291(%r8,%rax,4)
# INTEL: {evex}	sar	qword ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0xfc,0x08,0xd3,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   {nf}	sarq	%cl, 291(%r8,%rax,4)
# INTEL: {nf}	sar	qword ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0xfc,0x0c,0xd3,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   sarq	%cl, 291(%r8,%rax,4), %r9
# INTEL: sar	r9, qword ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0xb4,0x18,0xd3,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   {nf}	sarq	%cl, 291(%r8,%rax,4), %r9
# INTEL: {nf}	sar	r9, qword ptr [r8 + 4*rax + 291], cl
0x62,0xd4,0xb4,0x1c,0xd3,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   {evex}	sarw	%dx
# INTEL: {evex}	sar	dx
0x62,0xf4,0x7d,0x08,0xd1,0xfa

# ATT:   {nf}	sarw	%dx
# INTEL: {nf}	sar	dx
0x62,0xf4,0x7d,0x0c,0xd1,0xfa

# ATT:   sarw	%dx, %dx
# INTEL: sar	dx, dx
0x62,0xf4,0x6d,0x18,0xd1,0xfa

# ATT:   {nf}	sarw	%dx, %dx
# INTEL: {nf}	sar	dx, dx
0x62,0xf4,0x6d,0x1c,0xd1,0xfa

# ATT:   {evex}	sarl	%ecx
# INTEL: {evex}	sar	ecx
0x62,0xf4,0x7c,0x08,0xd1,0xf9

# ATT:   {nf}	sarl	%ecx
# INTEL: {nf}	sar	ecx
0x62,0xf4,0x7c,0x0c,0xd1,0xf9

# ATT:   sarl	%ecx, %ecx
# INTEL: sar	ecx, ecx
0x62,0xf4,0x74,0x18,0xd1,0xf9

# ATT:   {nf}	sarl	%ecx, %ecx
# INTEL: {nf}	sar	ecx, ecx
0x62,0xf4,0x74,0x1c,0xd1,0xf9

# ATT:   {evex}	sarq	%r9
# INTEL: {evex}	sar	r9
0x62,0xd4,0xfc,0x08,0xd1,0xf9

# ATT:   {nf}	sarq	%r9
# INTEL: {nf}	sar	r9
0x62,0xd4,0xfc,0x0c,0xd1,0xf9

# ATT:   sarq	%r9, %r9
# INTEL: sar	r9, r9
0x62,0xd4,0xb4,0x18,0xd1,0xf9

# ATT:   {nf}	sarq	%r9, %r9
# INTEL: {nf}	sar	r9, r9
0x62,0xd4,0xb4,0x1c,0xd1,0xf9

# ATT:   {evex}	sarb	291(%r8,%rax,4)
# INTEL: {evex}	sar	byte ptr [r8 + 4*rax + 291]
0x62,0xd4,0x7c,0x08,0xd0,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   {nf}	sarb	291(%r8,%rax,4)
# INTEL: {nf}	sar	byte ptr [r8 + 4*rax + 291]
0x62,0xd4,0x7c,0x0c,0xd0,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   sarb	291(%r8,%rax,4), %bl
# INTEL: sar	bl, byte ptr [r8 + 4*rax + 291]
0x62,0xd4,0x64,0x18,0xd0,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   {nf}	sarb	291(%r8,%rax,4), %bl
# INTEL: {nf}	sar	bl, byte ptr [r8 + 4*rax + 291]
0x62,0xd4,0x64,0x1c,0xd0,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   {evex}	sarw	291(%r8,%rax,4)
# INTEL: {evex}	sar	word ptr [r8 + 4*rax + 291]
0x62,0xd4,0x7d,0x08,0xd1,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   {nf}	sarw	291(%r8,%rax,4)
# INTEL: {nf}	sar	word ptr [r8 + 4*rax + 291]
0x62,0xd4,0x7d,0x0c,0xd1,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   sarw	291(%r8,%rax,4), %dx
# INTEL: sar	dx, word ptr [r8 + 4*rax + 291]
0x62,0xd4,0x6d,0x18,0xd1,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   {nf}	sarw	291(%r8,%rax,4), %dx
# INTEL: {nf}	sar	dx, word ptr [r8 + 4*rax + 291]
0x62,0xd4,0x6d,0x1c,0xd1,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   {evex}	sarl	291(%r8,%rax,4)
# INTEL: {evex}	sar	dword ptr [r8 + 4*rax + 291]
0x62,0xd4,0x7c,0x08,0xd1,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   {nf}	sarl	291(%r8,%rax,4)
# INTEL: {nf}	sar	dword ptr [r8 + 4*rax + 291]
0x62,0xd4,0x7c,0x0c,0xd1,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   sarl	291(%r8,%rax,4), %ecx
# INTEL: sar	ecx, dword ptr [r8 + 4*rax + 291]
0x62,0xd4,0x74,0x18,0xd1,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   {nf}	sarl	291(%r8,%rax,4), %ecx
# INTEL: {nf}	sar	ecx, dword ptr [r8 + 4*rax + 291]
0x62,0xd4,0x74,0x1c,0xd1,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   {evex}	sarq	291(%r8,%rax,4)
# INTEL: {evex}	sar	qword ptr [r8 + 4*rax + 291]
0x62,0xd4,0xfc,0x08,0xd1,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   {nf}	sarq	291(%r8,%rax,4)
# INTEL: {nf}	sar	qword ptr [r8 + 4*rax + 291]
0x62,0xd4,0xfc,0x0c,0xd1,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   sarq	291(%r8,%rax,4), %r9
# INTEL: sar	r9, qword ptr [r8 + 4*rax + 291]
0x62,0xd4,0xb4,0x18,0xd1,0xbc,0x80,0x23,0x01,0x00,0x00

# ATT:   {nf}	sarq	291(%r8,%rax,4), %r9
# INTEL: {nf}	sar	r9, qword ptr [r8 + 4*rax + 291]
0x62,0xd4,0xb4,0x1c,0xd1,0xbc,0x80,0x23,0x01,0x00,0x00