# 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-52: error:
# ERROR-NOT: error:
# CHECK: {evex} sbbb $123, %bl
# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0x80,0xdb,0x7b]
{evex} sbbb $123, %bl
# CHECK: sbbb $123, %bl, %cl
# CHECK: encoding: [0x62,0xf4,0x74,0x18,0x80,0xdb,0x7b]
sbbb $123, %bl, %cl
# CHECK: {evex} sbbw $123, %dx
# CHECK: encoding: [0x62,0xf4,0x7d,0x08,0x83,0xda,0x7b]
{evex} sbbw $123, %dx
# CHECK: sbbw $123, %dx, %ax
# CHECK: encoding: [0x62,0xf4,0x7d,0x18,0x83,0xda,0x7b]
sbbw $123, %dx, %ax
# CHECK: {evex} sbbl $123, %ecx
# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0x83,0xd9,0x7b]
{evex} sbbl $123, %ecx
# CHECK: sbbl $123, %ecx, %edx
# CHECK: encoding: [0x62,0xf4,0x6c,0x18,0x83,0xd9,0x7b]
sbbl $123, %ecx, %edx
# CHECK: {evex} sbbq $123, %r9
# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0x83,0xd9,0x7b]
{evex} sbbq $123, %r9
# CHECK: sbbq $123, %r9, %r15
# CHECK: encoding: [0x62,0xd4,0x84,0x18,0x83,0xd9,0x7b]
sbbq $123, %r9, %r15
# CHECK: {evex} sbbb $123, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0x80,0x9c,0x80,0x23,0x01,0x00,0x00,0x7b]
{evex} sbbb $123, 291(%r8,%rax,4)
# CHECK: sbbb $123, 291(%r8,%rax,4), %bl
# CHECK: encoding: [0x62,0xd4,0x64,0x18,0x80,0x9c,0x80,0x23,0x01,0x00,0x00,0x7b]
sbbb $123, 291(%r8,%rax,4), %bl
# CHECK: {evex} sbbw $123, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7d,0x08,0x83,0x9c,0x80,0x23,0x01,0x00,0x00,0x7b]
{evex} sbbw $123, 291(%r8,%rax,4)
# CHECK: sbbw $123, 291(%r8,%rax,4), %dx
# CHECK: encoding: [0x62,0xd4,0x6d,0x18,0x83,0x9c,0x80,0x23,0x01,0x00,0x00,0x7b]
sbbw $123, 291(%r8,%rax,4), %dx
# CHECK: {evex} sbbl $123, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0x83,0x9c,0x80,0x23,0x01,0x00,0x00,0x7b]
{evex} sbbl $123, 291(%r8,%rax,4)
# CHECK: sbbl $123, 291(%r8,%rax,4), %ecx
# CHECK: encoding: [0x62,0xd4,0x74,0x18,0x83,0x9c,0x80,0x23,0x01,0x00,0x00,0x7b]
sbbl $123, 291(%r8,%rax,4), %ecx
# CHECK: {evex} sbbq $123, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0x83,0x9c,0x80,0x23,0x01,0x00,0x00,0x7b]
{evex} sbbq $123, 291(%r8,%rax,4)
# CHECK: sbbq $123, 291(%r8,%rax,4), %r9
# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0x83,0x9c,0x80,0x23,0x01,0x00,0x00,0x7b]
sbbq $123, 291(%r8,%rax,4), %r9
# CHECK: {evex} sbbw $1234, %dx
# CHECK: encoding: [0x62,0xf4,0x7d,0x08,0x81,0xda,0xd2,0x04]
{evex} sbbw $1234, %dx
# CHECK: sbbw $1234, %dx, %ax
# CHECK: encoding: [0x62,0xf4,0x7d,0x18,0x81,0xda,0xd2,0x04]
sbbw $1234, %dx, %ax
# CHECK: {evex} sbbw $1234, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7d,0x08,0x81,0x9c,0x80,0x23,0x01,0x00,0x00,0xd2,0x04]
{evex} sbbw $1234, 291(%r8,%rax,4)
# CHECK: sbbw $1234, 291(%r8,%rax,4), %dx
# CHECK: encoding: [0x62,0xd4,0x6d,0x18,0x81,0x9c,0x80,0x23,0x01,0x00,0x00,0xd2,0x04]
sbbw $1234, 291(%r8,%rax,4), %dx
# CHECK: {evex} sbbl $123456, %ecx
# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0x81,0xd9,0x40,0xe2,0x01,0x00]
{evex} sbbl $123456, %ecx
# CHECK: sbbl $123456, %ecx, %edx
# CHECK: encoding: [0x62,0xf4,0x6c,0x18,0x81,0xd9,0x40,0xe2,0x01,0x00]
sbbl $123456, %ecx, %edx
# CHECK: {evex} sbbq $123456, %r9
# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0x81,0xd9,0x40,0xe2,0x01,0x00]
{evex} sbbq $123456, %r9
# CHECK: sbbq $123456, %r9, %r15
# CHECK: encoding: [0x62,0xd4,0x84,0x18,0x81,0xd9,0x40,0xe2,0x01,0x00]
sbbq $123456, %r9, %r15
# CHECK: {evex} sbbl $123456, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0x81,0x9c,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00]
{evex} sbbl $123456, 291(%r8,%rax,4)
# CHECK: sbbl $123456, 291(%r8,%rax,4), %ecx
# CHECK: encoding: [0x62,0xd4,0x74,0x18,0x81,0x9c,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00]
sbbl $123456, 291(%r8,%rax,4), %ecx
# CHECK: {evex} sbbq $123456, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0x81,0x9c,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00]
{evex} sbbq $123456, 291(%r8,%rax,4)
# CHECK: sbbq $123456, 291(%r8,%rax,4), %r9
# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0x81,0x9c,0x80,0x23,0x01,0x00,0x00,0x40,0xe2,0x01,0x00]
sbbq $123456, 291(%r8,%rax,4), %r9
# CHECK: {evex} sbbb %bl, %cl
# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0x18,0xd9]
{evex} sbbb %bl, %cl
# CHECK: sbbb %bl, %cl, %r8b
# CHECK: encoding: [0x62,0xf4,0x3c,0x18,0x18,0xd9]
sbbb %bl, %cl, %r8b
# CHECK: {evex} sbbb %bl, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0x18,0x9c,0x80,0x23,0x01,0x00,0x00]
{evex} sbbb %bl, 291(%r8,%rax,4)
# CHECK: sbbb %bl, 291(%r8,%rax,4), %cl
# CHECK: encoding: [0x62,0xd4,0x74,0x18,0x18,0x9c,0x80,0x23,0x01,0x00,0x00]
sbbb %bl, 291(%r8,%rax,4), %cl
# CHECK: {evex} sbbw %dx, %ax
# CHECK: encoding: [0x62,0xf4,0x7d,0x08,0x19,0xd0]
{evex} sbbw %dx, %ax
# CHECK: sbbw %dx, %ax, %r9w
# CHECK: encoding: [0x62,0xf4,0x35,0x18,0x19,0xd0]
sbbw %dx, %ax, %r9w
# CHECK: {evex} sbbw %dx, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7d,0x08,0x19,0x94,0x80,0x23,0x01,0x00,0x00]
{evex} sbbw %dx, 291(%r8,%rax,4)
# CHECK: sbbw %dx, 291(%r8,%rax,4), %ax
# CHECK: encoding: [0x62,0xd4,0x7d,0x18,0x19,0x94,0x80,0x23,0x01,0x00,0x00]
sbbw %dx, 291(%r8,%rax,4), %ax
# CHECK: {evex} sbbl %ecx, %edx
# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0x19,0xca]
{evex} sbbl %ecx, %edx
# CHECK: sbbl %ecx, %edx, %r10d
# CHECK: encoding: [0x62,0xf4,0x2c,0x18,0x19,0xca]
sbbl %ecx, %edx, %r10d
# CHECK: {evex} sbbl %ecx, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0x19,0x8c,0x80,0x23,0x01,0x00,0x00]
{evex} sbbl %ecx, 291(%r8,%rax,4)
# CHECK: sbbl %ecx, 291(%r8,%rax,4), %edx
# CHECK: encoding: [0x62,0xd4,0x6c,0x18,0x19,0x8c,0x80,0x23,0x01,0x00,0x00]
sbbl %ecx, 291(%r8,%rax,4), %edx
# CHECK: {evex} sbbq %r9, %r15
# CHECK: encoding: [0x62,0x54,0xfc,0x08,0x19,0xcf]
{evex} sbbq %r9, %r15
# CHECK: sbbq %r9, %r15, %r11
# CHECK: encoding: [0x62,0x54,0xa4,0x18,0x19,0xcf]
sbbq %r9, %r15, %r11
# CHECK: {evex} sbbq %r9, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0x54,0xfc,0x08,0x19,0x8c,0x80,0x23,0x01,0x00,0x00]
{evex} sbbq %r9, 291(%r8,%rax,4)
# CHECK: sbbq %r9, 291(%r8,%rax,4), %r15
# CHECK: encoding: [0x62,0x54,0x84,0x18,0x19,0x8c,0x80,0x23,0x01,0x00,0x00]
sbbq %r9, 291(%r8,%rax,4), %r15
# CHECK: {evex} sbbb 291(%r8,%rax,4), %bl
# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0x1a,0x9c,0x80,0x23,0x01,0x00,0x00]
{evex} sbbb 291(%r8,%rax,4), %bl
# CHECK: sbbb 291(%r8,%rax,4), %bl, %cl
# CHECK: encoding: [0x62,0xd4,0x74,0x18,0x1a,0x9c,0x80,0x23,0x01,0x00,0x00]
sbbb 291(%r8,%rax,4), %bl, %cl
# CHECK: {evex} sbbw 291(%r8,%rax,4), %dx
# CHECK: encoding: [0x62,0xd4,0x7d,0x08,0x1b,0x94,0x80,0x23,0x01,0x00,0x00]
{evex} sbbw 291(%r8,%rax,4), %dx
# CHECK: sbbw 291(%r8,%rax,4), %dx, %ax
# CHECK: encoding: [0x62,0xd4,0x7d,0x18,0x1b,0x94,0x80,0x23,0x01,0x00,0x00]
sbbw 291(%r8,%rax,4), %dx, %ax
# CHECK: {evex} sbbl 291(%r8,%rax,4), %ecx
# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0x1b,0x8c,0x80,0x23,0x01,0x00,0x00]
{evex} sbbl 291(%r8,%rax,4), %ecx
# CHECK: sbbl 291(%r8,%rax,4), %ecx, %edx
# CHECK: encoding: [0x62,0xd4,0x6c,0x18,0x1b,0x8c,0x80,0x23,0x01,0x00,0x00]
sbbl 291(%r8,%rax,4), %ecx, %edx
# CHECK: {evex} sbbq 291(%r8,%rax,4), %r9
# CHECK: encoding: [0x62,0x54,0xfc,0x08,0x1b,0x8c,0x80,0x23,0x01,0x00,0x00]
{evex} sbbq 291(%r8,%rax,4), %r9
# CHECK: sbbq 291(%r8,%rax,4), %r9, %r15
# CHECK: encoding: [0x62,0x54,0x84,0x18,0x1b,0x8c,0x80,0x23,0x01,0x00,0x00]
sbbq 291(%r8,%rax,4), %r9, %r15