target-i386: xsave: Add FP and SSE bits to x86_ext_save_areas

Instead of treating the FP and SSE bits as special cases, add
them to the x86_ext_save_areas array. This will simplify the code
that calculates the supported xsave components and the size of
the xsave area.

Backports commit e3c9022b4e2b6a4deb6518361d2bbf33522b9198 from qemu
This commit is contained in:
Eduardo Habkost 2018-02-26 09:36:54 -05:00 committed by Lioncash
parent 54bd827472
commit 08bfa41e1b
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -578,13 +578,19 @@ typedef struct ExtSaveArea {
static const ExtSaveArea x86_ext_save_areas[] = {
// XSTATE_FP_BIT
{
0, 0,
0, 0
/* x87 FP state component is always enabled if XSAVE is supported */
FEAT_1_ECX, CPUID_EXT_XSAVE,
/* x87 state is in the legacy region of the XSAVE area */
0,
sizeof(X86LegacyXSaveArea) + sizeof(X86XSaveHeader),
},
// XSTATE_SSE_BIT
{
0, 0,
0, 0,
/* SSE state component is always enabled if XSAVE is supported */
FEAT_1_ECX, CPUID_EXT_XSAVE,
/* SSE state is in the legacy region of the XSAVE area */
0,
sizeof(X86LegacyXSaveArea) + sizeof(X86XSaveHeader),
},
// XSTATE_YMM_BIT
{