diff --git a/arch/x86/include/asm/tasks_types.h b/arch/x86/include/asm/tasks_types.h index 34c01228..194a0410 100644 --- a/arch/x86/include/asm/tasks_types.h +++ b/arch/x86/include/asm/tasks_types.h @@ -50,10 +50,14 @@ typedef struct i387_fxsave_struct { long foo; long fos; long mxcsr; - long reserved; + long mxcsr_mask; long st_space[32]; - long xmm_space[32]; - long padding[56]; + long xmm_space[64]; + long padding[12]; + union { + long padding1[12]; + long sw_reserved[12]; + }; } i387_fxsave_t __attribute__ ((aligned (16))); union fpu_state { @@ -63,9 +67,9 @@ union fpu_state { static inline void save_fpu_state(union fpu_state* state) { if (has_fxsr()) - asm volatile ("fxsave %0; fnclex" : "=m"((*state).fxsave)); + asm volatile ("fxsave %0; fnclex" : "=m"((*state).fxsave) :: "memory"); else - asm volatile ("fsave %0; fwait" : "=m"((*state).fsave)); + asm volatile ("fnsave %0; fwait" : "=m"((*state).fsave) :: "memory"); } static inline void restore_fpu_state(union fpu_state* state) {