aboutsummaryrefslogtreecommitdiff
path: root/kern/task.h
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-11-29 16:20:21 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-11-29 16:20:21 +0100
commit261eb7f1ade265bb359609a796715fa06f4d32fd (patch)
tree283adca5d013fa7c9d0efdb430ac7167f5750bae /kern/task.h
parent5dbc6990b16a969e470392abe48e8ff9552780b3 (diff)
downloadgnumach-261eb7f1ade265bb359609a796715fa06f4d32fd.tar.gz
gnumach-261eb7f1ade265bb359609a796715fa06f4d32fd.tar.bz2
gnumach-261eb7f1ade265bb359609a796715fa06f4d32fd.zip
x86: Fix initialization of new threads
fninit does not clear MMX/SSE/AVX registers, so we have to use rstor to clear them when starting a new thread. Along the way, we can as well just have a default state to be loaded in each new thread. * i386/include/mach/i386/fp_reg.h (XSAVE_XCOMP_BV_COMPACT): New macro. * i386/i386/fpu.h (fp_default_state): New variable declaration. * i386/i386/fpu.c (fp_default_state): New variable. (MXCSR_DEFAULT, CWD_DEFAULT): New macros. (fpu_module_init): Allocate and initialize fp_default_state. (fpinit): rstor from fp_default_state instead of setting FPU state by hand. (fp_load): Copy initial state from fp_default_state instead of setting it to 0. This is more future-proof since this is the exact state that we are loading in fpinit. (fp_state_alloc): fp_state_alloc: Copy initial state from fp_default_state.
Diffstat (limited to 'kern/task.h')
0 files changed, 0 insertions, 0 deletions