]> xenbits.xensource.com Git - xen.git/commit
x86: AVX instruction emulation fixes
authorJan Beulich <jbeulich@suse.com>
Wed, 28 Aug 2013 15:03:50 +0000 (17:03 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 28 Aug 2013 15:03:50 +0000 (17:03 +0200)
commit062919448e2f4b127c9c3c085b1a8e1d56a33051
tree001f0949f52fb849cf730ee6f2acda47d65388b7
parent95d43eb2e957470a3a96bcd94a2f1094bef12bde
x86: AVX instruction emulation fixes

- we used the C4/C5 (first prefix) byte instead of the apparent ModR/M
  one as the second prefix byte
- early decoding normalized vex.reg, thus corrupting it for the main
  consumer (copy_REX_VEX()), resulting in #UD on the two-operand
  instructions we emulate

Also add respective test cases to the testing utility plus
- fix get_fpu() (the fall-through order was inverted)
- add cpu_has_avx2, even if it's currently unused (as in the new test
  cases I decided to refrain from using AVX2 instructions in order to
  be able to actually run all the tests on the hardware I have)
- slightly tweak cpu_has_avx to more consistently express the outputs
  we don't care about (sinking them all into the same variable)

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
tools/tests/x86_emulator/test_x86_emulator.c
xen/arch/x86/x86_emulate/x86_emulate.c