Oddity in mxcsr_feature_mask_init()
PATCH 1/1 Oddity in mxcsr_feature_mask_init()
Hi,
In arch/i386/kernel/i387.c:mxcsr_feature_mask_init(), one can read:
asm volatile("fxsave %0" : : "m" (current->thread.i387.fxsave)); But I would rather have written:
asm("fxsave %0" : "=m" (current->thread.i387.fxsave)); Considering the code around, it doesn't do much difference, but it makes more sense (i.e. we just fill fxsave).
Samuel
Signed-off-by Samuel Thibault <[email protected]>
arch/i386/kernel/i387.c renamed from arch/i386/kernel/i387.c.orig +1 -1
@@ -32,7 +32,7 @@clts ();if (cpu_has_fxsr) {memset (¤t->thread.i387.fxsave,0 ,sizeof (struct i387_fxsave_struct )); - asmvolatile ("fxsave %0" : :"m" (current->thread.i387.fxsave)); + asm("fxsave %0" :"=m" (current->thread.i387.fxsave)); mask = current->thread.i387.fxsave.mxcsr_mask;if (mask ==0 ) mask =0x0000ffbf ; }