aboutsummaryrefslogtreecommitdiff
path: root/i386/include
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-11-28 17:57:21 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-11-28 18:35:40 +0100
commit0e59d87e06f967680d250b9a74d08da1389b6212 (patch)
treef1daffaca55b607ba9c60a4ae04444e52b95a362 /i386/include
parentb885c5ea26fb3c2f2d91b6e9a1495070da429ea4 (diff)
downloadgnumach-0e59d87e06f967680d250b9a74d08da1389b6212.tar.gz
gnumach-0e59d87e06f967680d250b9a74d08da1389b6212.tar.bz2
gnumach-0e59d87e06f967680d250b9a74d08da1389b6212.zip
x86: Extend XSAVE support to unbound state
* i386/i386/fpu.c (fp_xsave_size): New variable. (init_fpu): Save XSAVE size to fp_xsave_size. (fpu_module_init): Pass fp_xsave_size as size to kmem_cache_init. (fpu_set_state, fp_load, fp_state_alloc): Use fp_xsave_size to clear ifps. * i386/include/mach/i386/fp_reg.h (struct i386_xfp_save): Replace static fp_yreg_word with extended field. * i386/i386/thread.h (struct i386_fpsave_state): Make fp_valid field first in the structure to let the extended finish the structure.
Diffstat (limited to 'i386/include')
-rw-r--r--i386/include/mach/i386/fp_reg.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/i386/include/mach/i386/fp_reg.h b/i386/include/mach/i386/fp_reg.h
index 5992ea78..41301ec4 100644
--- a/i386/include/mach/i386/fp_reg.h
+++ b/i386/include/mach/i386/fp_reg.h
@@ -79,12 +79,9 @@ struct i386_xfp_save {
/* space for 16 128-bit XMM registers */
unsigned int padding[24];
struct i386_xfp_xstate_header header;
-
- unsigned char fp_yreg_word[16][16];
- /* space for the high part of the
- * 16 256-bit YMM registers */
+ unsigned char extended[0]; /* Extended region */
} __attribute__((packed, aligned(64)));
-_Static_assert(sizeof(struct i386_xfp_save) == 512 + 8*8 + 16*16);
+_Static_assert(sizeof(struct i386_xfp_save) == 512 + 8*8);
/*
* Control register