# 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-8: error:
# ERROR-NOT: error:

## enqcmd

# CHECK: {evex}	enqcmd	123(%eax,%ebx,4), %ecx
# CHECK: encoding: [0x67,0x62,0xf4,0x7f,0x08,0xf8,0x4c,0x98,0x7b]
         {evex}	enqcmd	123(%eax,%ebx,4), %ecx

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

# CHECK: enqcmd	291(%r28d,%r29d,4), %r18d
# CHECK: encoding: [0x67,0x62,0x8c,0x7b,0x08,0xf8,0x94,0xac,0x23,0x01,0x00,0x00]
         enqcmd	291(%r28d,%r29d,4), %r18d

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

## enqcmds

# CHECK: {evex}	enqcmds	123(%eax,%ebx,4), %ecx
# CHECK: encoding: [0x67,0x62,0xf4,0x7e,0x08,0xf8,0x4c,0x98,0x7b]
         {evex}	enqcmds	123(%eax,%ebx,4), %ecx

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

# CHECK: enqcmds	291(%r28d,%r29d,4), %r18d
# CHECK: encoding: [0x67,0x62,0x8c,0x7a,0x08,0xf8,0x94,0xac,0x23,0x01,0x00,0x00]
         enqcmds	291(%r28d,%r29d,4), %r18d

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