- return convert_fxsr_to_user( (struct _fpstate __user *)buf,
- &tsk->thread.i387.fxsave );
+ struct _fpreg *to;
+ const struct _fpxreg *from;
+ unsigned int i;
+
+ convert_fxsr_env_to_i387((unsigned long *) buf,
+ &tsk->thread.i387.fxsave);
+
+ to = (struct _fpreg *) buf->st_space;
+ from = (const struct _fpxreg *) &tsk->thread.i387.fxsave.st_space[0];
+ for (i = 0; i < 8; i++, to++, from++)
+ *to = *(const struct _fpreg *) from;