x86emul: support AVX512 opmask insns
authorJan Beulich <jbeulich@suse.com>
Fri, 26 Oct 2018 13:20:37 +0000 (15:20 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 26 Oct 2018 13:20:37 +0000 (15:20 +0200)
commit304a8301fc9c6ff1f45a6aa081c56cd57bc7696a
tree78e0507a51524fbf6fcd09bb3f86c2cad47fd524
parenta14ca73359ec7b47c1b81b3ad88ef17baf6ebdfb
x86emul: support AVX512 opmask insns

These are all VEX encoded, so the EVEX decoding logic continues to
remain unused at this point.

The new testcase is deliberately coded in assembly, as a C one would
have become almost unreadable due to the overwhelming amount of
__builtin_...() that would need to be used. After all the compiler has
no underlying type (yet) that could be operated on without builtins,
other than the vector types used for "normal" SIMD insns.

Note that outside of 64-bit mode and despite the SDM not currently
saying so, VEX.W is ignored for the KMOV{D,Q} encodings to/from GPRs,
just like e.g. for the similar VMOV{D,Q}.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/tests/x86_emulator/Makefile
tools/tests/x86_emulator/opmask.S [new file with mode: 0644]
tools/tests/x86_emulator/test_x86_emulator.c
tools/tests/x86_emulator/testcase.mk
tools/tests/x86_emulator/x86-emulate.c
tools/tests/x86_emulator/x86-emulate.h
xen/arch/x86/x86_emulate/x86_emulate.c
xen/arch/x86/x86_emulate/x86_emulate.h
xen/include/asm-x86/cpufeature.h