Lines Matching refs:env
232 convert_from_fxsr(struct user_i387_ia32_struct *env, struct task_struct *tsk) in convert_from_fxsr() argument
235 struct _fpreg *to = (struct _fpreg *) &env->st_space[0]; in convert_from_fxsr()
239 env->cwd = fxsave->cwd | 0xffff0000u; in convert_from_fxsr()
240 env->swd = fxsave->swd | 0xffff0000u; in convert_from_fxsr()
241 env->twd = twd_fxsr_to_i387(fxsave); in convert_from_fxsr()
244 env->fip = fxsave->rip; in convert_from_fxsr()
245 env->foo = fxsave->rdp; in convert_from_fxsr()
250 env->fcs = task_pt_regs(tsk)->cs; in convert_from_fxsr()
252 savesegment(ds, env->fos); in convert_from_fxsr()
254 env->fos = tsk->thread.ds; in convert_from_fxsr()
256 env->fos |= 0xffff0000; in convert_from_fxsr()
258 env->fip = fxsave->fip; in convert_from_fxsr()
259 env->fcs = (u16) fxsave->fcs | ((u32) fxsave->fop << 16); in convert_from_fxsr()
260 env->foo = fxsave->foo; in convert_from_fxsr()
261 env->fos = fxsave->fos; in convert_from_fxsr()
269 const struct user_i387_ia32_struct *env) in convert_to_fxsr() argument
272 struct _fpreg *from = (struct _fpreg *) &env->st_space[0]; in convert_to_fxsr()
276 fxsave->cwd = env->cwd; in convert_to_fxsr()
277 fxsave->swd = env->swd; in convert_to_fxsr()
278 fxsave->twd = twd_i387_to_fxsr(env->twd); in convert_to_fxsr()
279 fxsave->fop = (u16) ((u32) env->fcs >> 16); in convert_to_fxsr()
281 fxsave->rip = env->fip; in convert_to_fxsr()
282 fxsave->rdp = env->foo; in convert_to_fxsr()
285 fxsave->fip = env->fip; in convert_to_fxsr()
286 fxsave->fcs = (env->fcs & 0xffff); in convert_to_fxsr()
287 fxsave->foo = env->foo; in convert_to_fxsr()
288 fxsave->fos = env->fos; in convert_to_fxsr()
300 struct user_i387_ia32_struct env; in fpregs_get() local
314 if (kbuf && pos == 0 && count == sizeof(env)) { in fpregs_get()
319 convert_from_fxsr(&env, target); in fpregs_get()
321 return user_regset_copyout(&pos, &count, &kbuf, &ubuf, &env, 0, -1); in fpregs_get()
329 struct user_i387_ia32_struct env; in fpregs_set() local
343 if (pos > 0 || count < sizeof(env)) in fpregs_set()
344 convert_from_fxsr(&env, target); in fpregs_set()
346 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &env, 0, -1); in fpregs_set()
348 convert_to_fxsr(&target->thread.fpu.state.fxsave, &env); in fpregs_set()