# RUN: llvm-mc -triple x86_64 --show-encoding %s | FileCheck %s
# RUN: not llvm-mc -triple i386 -show-encoding %s 2>&1 | FileCheck %s --check-prefix=ERROR

# ERROR-COUNT-16: error:
# ERROR-NOT: error:

## aadd

# CHECK: {evex}	aaddl	%ecx, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0xfc,0x4c,0x98,0x7b]
         {evex}	aaddl	%ecx, 123(%rax,%rbx,4)

# CHECK: {evex}	aaddq	%r9, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0x74,0xfc,0x08,0xfc,0x4c,0x98,0x7b]
         {evex}	aaddq	%r9, 123(%rax,%rbx,4)

# CHECK: aaddl	%r18d, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8c,0x78,0x08,0xfc,0x94,0xac,0x23,0x01,0x00,0x00]
         aaddl	%r18d, 291(%r28,%r29,4)

# CHECK: aaddq	%r19, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8c,0xf8,0x08,0xfc,0x9c,0xac,0x23,0x01,0x00,0x00]
         aaddq	%r19, 291(%r28,%r29,4)

## aand

# CHECK: {evex}	aandl	%ecx, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0xf4,0x7d,0x08,0xfc,0x4c,0x98,0x7b]
         {evex}	aandl	%ecx, 123(%rax,%rbx,4)

# CHECK: {evex}	aandq	%r9, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0x74,0xfd,0x08,0xfc,0x4c,0x98,0x7b]
         {evex}	aandq	%r9, 123(%rax,%rbx,4)

# CHECK: aandl	%r18d, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8c,0x79,0x08,0xfc,0x94,0xac,0x23,0x01,0x00,0x00]
         aandl	%r18d, 291(%r28,%r29,4)

# CHECK: aandq	%r19, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8c,0xf9,0x08,0xfc,0x9c,0xac,0x23,0x01,0x00,0x00]
         aandq	%r19, 291(%r28,%r29,4)

## aor

# CHECK: {evex}	aorl	%ecx, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0xf4,0x7f,0x08,0xfc,0x4c,0x98,0x7b]
         {evex}	aorl	%ecx, 123(%rax,%rbx,4)

# CHECK: {evex}	aorq	%r9, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0x74,0xff,0x08,0xfc,0x4c,0x98,0x7b]
         {evex}	aorq	%r9, 123(%rax,%rbx,4)

# CHECK: aorl	%r18d, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8c,0x7b,0x08,0xfc,0x94,0xac,0x23,0x01,0x00,0x00]
         aorl	%r18d, 291(%r28,%r29,4)

# CHECK: aorq	%r19, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8c,0xfb,0x08,0xfc,0x9c,0xac,0x23,0x01,0x00,0x00]
         aorq	%r19, 291(%r28,%r29,4)

## axor

# CHECK: {evex}	axorl	%ecx, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0xf4,0x7e,0x08,0xfc,0x4c,0x98,0x7b]
         {evex}	axorl	%ecx, 123(%rax,%rbx,4)

# CHECK: {evex}	axorq	%r9, 123(%rax,%rbx,4)
# CHECK: encoding: [0x62,0x74,0xfe,0x08,0xfc,0x4c,0x98,0x7b]
         {evex}	axorq	%r9, 123(%rax,%rbx,4)

# CHECK: axorl	%r18d, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8c,0x7a,0x08,0xfc,0x94,0xac,0x23,0x01,0x00,0x00]
         axorl	%r18d, 291(%r28,%r29,4)

# CHECK: axorq	%r19, 291(%r28,%r29,4)
# CHECK: encoding: [0x62,0x8c,0xfa,0x08,0xfc,0x9c,0xac,0x23,0x01,0x00,0x00]
         axorq	%r19, 291(%r28,%r29,4)
