tests/x86emul: Helpers to save and restore FPU state
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 6 Mar 2018 13:42:36 +0000 (13:42 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 9 Mar 2018 15:42:23 +0000 (15:42 +0000)
commit1a81958928f07b45f170427647876ba5d49f9fb9
tree5a7f745b7b0566ebfcc17e936f0edbe12d7980ad
parent2c85e86f0be6b1b22ba57dd9257cba6dfac44ea4
tests/x86emul: Helpers to save and restore FPU state

Introduce common helpers for saving and restoring FPU state.  During
emul_test_init(), calculate whether to use xsave or fxsave, and tweak the
existing mxcsr_mask logic to avoid using another large static buffer.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
tools/tests/x86_emulator/x86-emulate.c
tools/tests/x86_emulator/x86-emulate.h