llvm/llvm/test/MC/X86/apx/kmov-intel.s

# RUN: llvm-mc -triple x86_64 -show-encoding -x86-asm-syntax=intel -output-asm-variant=1 %s | FileCheck %s

# CHECK: {evex}	kmovb	k2, k1
# CHECK: encoding: [0x62,0xf1,0x7d,0x08,0x90,0xd1]
         {evex}	kmovb	k2, k1
# CHECK: {evex}	kmovw	k2, k1
# CHECK: encoding: [0x62,0xf1,0x7c,0x08,0x90,0xd1]
         {evex}	kmovw	k2, k1
# CHECK: {evex}	kmovd	k2, k1
# CHECK: encoding: [0x62,0xf1,0xfd,0x08,0x90,0xd1]
         {evex}	kmovd	k2, k1
# CHECK: {evex}	kmovq	k2, k1
# CHECK: encoding: [0x62,0xf1,0xfc,0x08,0x90,0xd1]
         {evex}	kmovq	k2, k1

# CHECK-NOT: {evex}

# CHECK: kmovb	k1, r16d
# CHECK: encoding: [0x62,0xf9,0x7d,0x08,0x92,0xc8]
         kmovb	k1, r16d
# CHECK: kmovw	k1, r16d
# CHECK: encoding: [0x62,0xf9,0x7c,0x08,0x92,0xc8]
         kmovw	k1, r16d
# CHECK: kmovd	k1, r16d
# CHECK: encoding: [0x62,0xf9,0x7f,0x08,0x92,0xc8]
         kmovd	k1, r16d
# CHECK: kmovq	k1, r16
# CHECK: encoding: [0x62,0xf9,0xff,0x08,0x92,0xc8]
         kmovq	k1, r16

# CHECK: kmovb	r16d, k1
# CHECK: encoding: [0x62,0xe1,0x7d,0x08,0x93,0xc1]
         kmovb	r16d, k1
# CHECK: kmovw	r16d, k1
# CHECK: encoding: [0x62,0xe1,0x7c,0x08,0x93,0xc1]
         kmovw	r16d, k1
# CHECK: kmovd	r16d, k1
# CHECK: encoding: [0x62,0xe1,0x7f,0x08,0x93,0xc1]
         kmovd	r16d, k1
# CHECK: kmovq	r16, k1
# CHECK: encoding: [0x62,0xe1,0xff,0x08,0x93,0xc1]
         kmovq	r16, k1

# CHECK: kmovb	k1, byte ptr [r16 + r17]
# CHECK: encoding: [0x62,0xf9,0x79,0x08,0x90,0x0c,0x08]
         kmovb	k1, byte ptr [r16 + r17]
# CHECK: kmovw	k1, word ptr [r16 + r17]
# CHECK: encoding: [0x62,0xf9,0x78,0x08,0x90,0x0c,0x08]
         kmovw	k1, word ptr [r16 + r17]
# CHECK: kmovd	k1, dword ptr [r16 + r17]
# CHECK: encoding: [0x62,0xf9,0xf9,0x08,0x90,0x0c,0x08]
         kmovd	k1, dword ptr [r16 + r17]
# CHECK: kmovq	k1, qword ptr [r16 + r17]
# CHECK: encoding: [0x62,0xf9,0xf8,0x08,0x90,0x0c,0x08]
         kmovq	k1, qword ptr [r16 + r17]

# CHECK: kmovb	byte ptr [r16 + r17], k1
# CHECK: encoding: [0x62,0xf9,0x79,0x08,0x91,0x0c,0x08]
         kmovb	byte ptr [r16 + r17], k1
# CHECK: kmovw	word ptr [r16 + r17], k1
# CHECK: encoding: [0x62,0xf9,0x78,0x08,0x91,0x0c,0x08]
         kmovw	word ptr [r16 + r17], k1
# CHECK: kmovd	dword ptr [r16 + r17], k1
# CHECK: encoding: [0x62,0xf9,0xf9,0x08,0x91,0x0c,0x08]
         kmovd	dword ptr [r16 + r17], k1
# CHECK: kmovq	qword ptr [r16 + r17], k1
# CHECK: encoding: [0x62,0xf9,0xf8,0x08,0x91,0x0c,0x08]
         kmovq	qword ptr [r16 + r17], k1