Lines Matching full:env

330 static void __convert_from_fxsr(struct user_i387_ia32_struct *env,  in __convert_from_fxsr()  argument
334 struct _fpreg *to = (struct _fpreg *) &env->st_space[0]; in __convert_from_fxsr()
338 env->cwd = fxsave->cwd | 0xffff0000u; in __convert_from_fxsr()
339 env->swd = fxsave->swd | 0xffff0000u; in __convert_from_fxsr()
340 env->twd = twd_fxsr_to_i387(fxsave); in __convert_from_fxsr()
343 env->fip = fxsave->rip; in __convert_from_fxsr()
344 env->foo = fxsave->rdp; in __convert_from_fxsr()
349 env->fcs = task_pt_regs(tsk)->cs; in __convert_from_fxsr()
351 savesegment(ds, env->fos); in __convert_from_fxsr()
353 env->fos = tsk->thread.ds; in __convert_from_fxsr()
355 env->fos |= 0xffff0000; in __convert_from_fxsr()
357 env->fip = fxsave->fip; in __convert_from_fxsr()
358 env->fcs = (u16) fxsave->fcs | ((u32) fxsave->fop << 16); in __convert_from_fxsr()
359 env->foo = fxsave->foo; in __convert_from_fxsr()
360 env->fos = fxsave->fos; in __convert_from_fxsr()
368 convert_from_fxsr(struct user_i387_ia32_struct *env, struct task_struct *tsk) in convert_from_fxsr() argument
370 __convert_from_fxsr(env, tsk, &tsk->thread.fpu.fpstate->regs.fxsave); in convert_from_fxsr()
374 const struct user_i387_ia32_struct *env) in convert_to_fxsr() argument
377 struct _fpreg *from = (struct _fpreg *) &env->st_space[0]; in convert_to_fxsr()
381 fxsave->cwd = env->cwd; in convert_to_fxsr()
382 fxsave->swd = env->swd; in convert_to_fxsr()
383 fxsave->twd = twd_i387_to_fxsr(env->twd); in convert_to_fxsr()
384 fxsave->fop = (u16) ((u32) env->fcs >> 16); in convert_to_fxsr()
386 fxsave->rip = env->fip; in convert_to_fxsr()
387 fxsave->rdp = env->foo; in convert_to_fxsr()
390 fxsave->fip = env->fip; in convert_to_fxsr()
391 fxsave->fcs = (env->fcs & 0xffff); in convert_to_fxsr()
392 fxsave->foo = env->foo; in convert_to_fxsr()
393 fxsave->fos = env->fos; in convert_to_fxsr()
404 struct user_i387_ia32_struct env; in fpregs_get() local
427 __convert_from_fxsr(&env, target, fx); in fpregs_get()
428 return membuf_write(&to, &env, sizeof(env)); in fpregs_get()
436 struct user_i387_ia32_struct env; in fpregs_set() local
446 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &env, 0, -1); in fpregs_set()
453 convert_to_fxsr(&fpu->fpstate->regs.fxsave, &env); in fpregs_set()
455 memcpy(&fpu->fpstate->regs.fsave, &env, sizeof(env)); in fpregs_set()