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

# RUN: llvm-mc --disassemble %s -triple=x86_64 | FileCheck %s --check-prefixes=ATT
# RUN: llvm-mc --disassemble %s -triple=x86_64 -x86-asm-syntax=intel --output-asm-variant=1 | FileCheck %s --check-prefixes=INTEL

## mulx

# ATT:   mulxl	%ecx, %edx, %r10d
# INTEL: mulx	r10d, edx, ecx
0x62,0x72,0x6f,0x08,0xf6,0xd1

# ATT:   mulxq	%r9, %r15, %r11
# INTEL: mulx	r11, r15, r9
0x62,0x52,0x87,0x08,0xf6,0xd9

# ATT:   mulxl	123(%rax,%rbx,4), %ecx, %edx
# INTEL: mulx	edx, ecx, dword ptr [rax + 4*rbx + 123]
0x62,0xf2,0x77,0x08,0xf6,0x54,0x98,0x7b

# ATT:   mulxq	123(%rax,%rbx,4), %r9, %r15
# INTEL: mulx	r15, r9, qword ptr [rax + 4*rbx + 123]
0x62,0x72,0xb7,0x08,0xf6,0x7c,0x98,0x7b

# ATT:   mulxl	%r18d, %r22d, %r26d
# INTEL: mulx	r26d, r22d, r18d
0x62,0x6a,0x4f,0x00,0xf6,0xd2

# ATT:   mulxq	%r19, %r23, %r27
# INTEL: mulx	r27, r23, r19
0x62,0x6a,0xc7,0x00,0xf6,0xdb

# ATT:   mulxl	291(%r28,%r29,4), %r18d, %r22d
# INTEL: mulx	r22d, r18d, dword ptr [r28 + 4*r29 + 291]
0x62,0x8a,0x6b,0x00,0xf6,0xb4,0xac,0x23,0x01,0x00,0x00

# ATT:   mulxq	291(%r28,%r29,4), %r19, %r23
# INTEL: mulx	r23, r19, qword ptr [r28 + 4*r29 + 291]
0x62,0x8a,0xe3,0x00,0xf6,0xbc,0xac,0x23,0x01,0x00,0x00

## pdep

# ATT:   pdepl	%ecx, %edx, %r10d
# INTEL: pdep	r10d, edx, ecx
0x62,0x72,0x6f,0x08,0xf5,0xd1

# ATT:   pdepq	%r9, %r15, %r11
# INTEL: pdep	r11, r15, r9
0x62,0x52,0x87,0x08,0xf5,0xd9

# ATT:   pdepl	123(%rax,%rbx,4), %ecx, %edx
# INTEL: pdep	edx, ecx, dword ptr [rax + 4*rbx + 123]
0x62,0xf2,0x77,0x08,0xf5,0x54,0x98,0x7b

# ATT:   pdepq	123(%rax,%rbx,4), %r9, %r15
# INTEL: pdep	r15, r9, qword ptr [rax + 4*rbx + 123]
0x62,0x72,0xb7,0x08,0xf5,0x7c,0x98,0x7b

# ATT:   pdepl	%r18d, %r22d, %r26d
# INTEL: pdep	r26d, r22d, r18d
0x62,0x6a,0x4f,0x00,0xf5,0xd2

# ATT:   pdepq	%r19, %r23, %r27
# INTEL: pdep	r27, r23, r19
0x62,0x6a,0xc7,0x00,0xf5,0xdb

# ATT:   pdepl	291(%r28,%r29,4), %r18d, %r22d
# INTEL: pdep	r22d, r18d, dword ptr [r28 + 4*r29 + 291]
0x62,0x8a,0x6b,0x00,0xf5,0xb4,0xac,0x23,0x01,0x00,0x00

# ATT:   pdepq	291(%r28,%r29,4), %r19, %r23
# INTEL: pdep	r23, r19, qword ptr [r28 + 4*r29 + 291]
0x62,0x8a,0xe3,0x00,0xf5,0xbc,0xac,0x23,0x01,0x00,0x00

## pext

# ATT:   pextl	%ecx, %edx, %r10d
# INTEL: pext	r10d, edx, ecx
0x62,0x72,0x6e,0x08,0xf5,0xd1

# ATT:   pextq	%r9, %r15, %r11
# INTEL: pext	r11, r15, r9
0x62,0x52,0x86,0x08,0xf5,0xd9

# ATT:   pextl	123(%rax,%rbx,4), %ecx, %edx
# INTEL: pext	edx, ecx, dword ptr [rax + 4*rbx + 123]
0x62,0xf2,0x76,0x08,0xf5,0x54,0x98,0x7b

# ATT:   pextq	123(%rax,%rbx,4), %r9, %r15
# INTEL: pext	r15, r9, qword ptr [rax + 4*rbx + 123]
0x62,0x72,0xb6,0x08,0xf5,0x7c,0x98,0x7b

# ATT:   pextl	%r18d, %r22d, %r26d
# INTEL: pext	r26d, r22d, r18d
0x62,0x6a,0x4e,0x00,0xf5,0xd2

# ATT:   pextq	%r19, %r23, %r27
# INTEL: pext	r27, r23, r19
0x62,0x6a,0xc6,0x00,0xf5,0xdb

# ATT:   pextl	291(%r28,%r29,4), %r18d, %r22d
# INTEL: pext	r22d, r18d, dword ptr [r28 + 4*r29 + 291]
0x62,0x8a,0x6a,0x00,0xf5,0xb4,0xac,0x23,0x01,0x00,0x00

# ATT:   pextq	291(%r28,%r29,4), %r19, %r23
# INTEL: pext	r23, r19, qword ptr [r28 + 4*r29 + 291]
0x62,0x8a,0xe2,0x00,0xf5,0xbc,0xac,0x23,0x01,0x00,0x00

## rorx

# ATT:   rorxl	$123, %ecx, %edx
# INTEL: rorx	edx, ecx, 123
0x62,0xf3,0x7f,0x08,0xf0,0xd1,0x7b

# ATT:   rorxq	$123, %r9, %r15
# INTEL: rorx	r15, r9, 123
0x62,0x53,0xff,0x08,0xf0,0xf9,0x7b

# ATT:   rorxl	$123, 123(%rax,%rbx,4), %ecx
# INTEL: rorx	ecx, dword ptr [rax + 4*rbx + 123], 123
0x62,0xf3,0x7f,0x08,0xf0,0x4c,0x98,0x7b,0x7b

# ATT:   rorxq	$123, 123(%rax,%rbx,4), %r9
# INTEL: rorx	r9, qword ptr [rax + 4*rbx + 123], 123
0x62,0x73,0xff,0x08,0xf0,0x4c,0x98,0x7b,0x7b

# ATT:   rorxl	$123, %r18d, %r22d
# INTEL: rorx	r22d, r18d, 123
0x62,0xeb,0x7f,0x08,0xf0,0xf2,0x7b

# ATT:   rorxq	$123, %r19, %r23
# INTEL: rorx	r23, r19, 123
0x62,0xeb,0xff,0x08,0xf0,0xfb,0x7b

# ATT:   rorxl	$123, 291(%r28,%r29,4), %r18d
# INTEL: rorx	r18d, dword ptr [r28 + 4*r29 + 291], 123
0x62,0x8b,0x7b,0x08,0xf0,0x94,0xac,0x23,0x01,0x00,0x00,0x7b

# ATT:   rorxq	$123, 291(%r28,%r29,4), %r19
# INTEL: rorx	r19, qword ptr [r28 + 4*r29 + 291], 123
0x62,0x8b,0xfb,0x08,0xf0,0x9c,0xac,0x23,0x01,0x00,0x00,0x7b

## sarx

# ATT:   sarxl	%ecx, %edx, %r10d
# INTEL: sarx	r10d, edx, ecx
0x62,0x72,0x76,0x08,0xf7,0xd2

# ATT:   sarxl	%ecx, 123(%rax,%rbx,4), %edx
# INTEL: sarx	edx, dword ptr [rax + 4*rbx + 123], ecx
0x62,0xf2,0x76,0x08,0xf7,0x54,0x98,0x7b

# ATT:   sarxq	%r9, %r15, %r11
# INTEL: sarx	r11, r15, r9
0x62,0x52,0xb6,0x08,0xf7,0xdf

# ATT:   sarxq	%r9, 123(%rax,%rbx,4), %r15
# INTEL: sarx	r15, qword ptr [rax + 4*rbx + 123], r9
0x62,0x72,0xb6,0x08,0xf7,0x7c,0x98,0x7b

# ATT:   sarxl	%r18d, %r22d, %r26d
# INTEL: sarx	r26d, r22d, r18d
0x62,0x6a,0x6e,0x00,0xf7,0xd6

# ATT:   sarxl	%r18d, 291(%r28,%r29,4), %r22d
# INTEL: sarx	r22d, dword ptr [r28 + 4*r29 + 291], r18d
0x62,0x8a,0x6a,0x00,0xf7,0xb4,0xac,0x23,0x01,0x00,0x00

# ATT:   sarxq	%r19, %r23, %r27
# INTEL: sarx	r27, r23, r19
0x62,0x6a,0xe6,0x00,0xf7,0xdf

# ATT:   sarxq	%r19, 291(%r28,%r29,4), %r23
# INTEL: sarx	r23, qword ptr [r28 + 4*r29 + 291], r19
0x62,0x8a,0xe2,0x00,0xf7,0xbc,0xac,0x23,0x01,0x00,0x00

## shlx

# ATT:   shlxl	%ecx, %edx, %r10d
# INTEL: shlx	r10d, edx, ecx
0x62,0x72,0x75,0x08,0xf7,0xd2

# ATT:   shlxl	%ecx, 123(%rax,%rbx,4), %edx
# INTEL: shlx	edx, dword ptr [rax + 4*rbx + 123], ecx
0x62,0xf2,0x75,0x08,0xf7,0x54,0x98,0x7b

# ATT:   shlxq	%r9, %r15, %r11
# INTEL: shlx	r11, r15, r9
0x62,0x52,0xb5,0x08,0xf7,0xdf

# ATT:   shlxq	%r9, 123(%rax,%rbx,4), %r15
# INTEL: shlx	r15, qword ptr [rax + 4*rbx + 123], r9
0x62,0x72,0xb5,0x08,0xf7,0x7c,0x98,0x7b

# ATT:   shlxl	%r18d, %r22d, %r26d
# INTEL: shlx	r26d, r22d, r18d
0x62,0x6a,0x6d,0x00,0xf7,0xd6

# ATT:   shlxl	%r18d, 291(%r28,%r29,4), %r22d
# INTEL: shlx	r22d, dword ptr [r28 + 4*r29 + 291], r18d
0x62,0x8a,0x69,0x00,0xf7,0xb4,0xac,0x23,0x01,0x00,0x00

# ATT:   shlxq	%r19, %r23, %r27
# INTEL: shlx	r27, r23, r19
0x62,0x6a,0xe5,0x00,0xf7,0xdf

# ATT:   shlxq	%r19, 291(%r28,%r29,4), %r23
# INTEL: shlx	r23, qword ptr [r28 + 4*r29 + 291], r19
0x62,0x8a,0xe1,0x00,0xf7,0xbc,0xac,0x23,0x01,0x00,0x00

## shrx

# ATT:   shrxl	%ecx, %edx, %r10d
# INTEL: shrx	r10d, edx, ecx
0x62,0x72,0x77,0x08,0xf7,0xd2

# ATT:   shrxl	%ecx, 123(%rax,%rbx,4), %edx
# INTEL: shrx	edx, dword ptr [rax + 4*rbx + 123], ecx
0x62,0xf2,0x77,0x08,0xf7,0x54,0x98,0x7b

# ATT:   shrxq	%r9, %r15, %r11
# INTEL: shrx	r11, r15, r9
0x62,0x52,0xb7,0x08,0xf7,0xdf

# ATT:   shrxq	%r9, 123(%rax,%rbx,4), %r15
# INTEL: shrx	r15, qword ptr [rax + 4*rbx + 123], r9
0x62,0x72,0xb7,0x08,0xf7,0x7c,0x98,0x7b

# ATT:   shrxl	%r18d, %r22d, %r26d
# INTEL: shrx	r26d, r22d, r18d
0x62,0x6a,0x6f,0x00,0xf7,0xd6

# ATT:   shrxl	%r18d, 291(%r28,%r29,4), %r22d
# INTEL: shrx	r22d, dword ptr [r28 + 4*r29 + 291], r18d
0x62,0x8a,0x6b,0x00,0xf7,0xb4,0xac,0x23,0x01,0x00,0x00

# ATT:   shrxq	%r19, %r23, %r27
# INTEL: shrx	r27, r23, r19
0x62,0x6a,0xe7,0x00,0xf7,0xdf

# ATT:   shrxq	%r19, 291(%r28,%r29,4), %r23
# INTEL: shrx	r23, qword ptr [r28 + 4*r29 + 291], r19
0x62,0x8a,0xe3,0x00,0xf7,0xbc,0xac,0x23,0x01,0x00,0x00