x86emul: support AVX512F legacy-equivalent scalar int/FP conversion insns
authorJan Beulich <jbeulich@suse.com>
Fri, 24 May 2019 08:22:55 +0000 (10:22 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 24 May 2019 08:22:55 +0000 (10:22 +0200)
commitbaf4a376f55051b18bdf3d65a7d78cff8bb4fb51
tree050e839fa944f5d434f9d70024e2fd92b9e45046
parented806f3737304b1aa01e8f7dfd01460018f8c023
x86emul: support AVX512F legacy-equivalent scalar int/FP conversion insns

VCVT{,T}S{S,D}2SI use EVEX.W for their destination (register) rather
than their (possibly memory) source operand size and hence need a
"manual" override of disp8scale.

While the SDM claims that EVEX.L'L needs to be zero for the 32-bit forms
of VCVT{,U}SI2SD (exception type E10NF), observations on my test system
do not confirm this (and I've got informal confirmation that this is a
doc mistake). Nevertheless, to be on the safe side, force evex.lr to be
zero in this case though when constructing the stub.

Slightly adjust the scalar to_int() in the test harness, to increase the
chances of the operand ending up in memory.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/tests/x86_emulator/evex-disp8.c
tools/tests/x86_emulator/simd.c
tools/tests/x86_emulator/simd.h
xen/arch/x86/x86_emulate/x86_emulate.c