Lines Matching refs:fxsave

81 		return membuf_write(&to, &fpu->fpstate->regs.fxsave,  in xfpregs_get()
82 sizeof(fpu->fpstate->regs.fxsave)); in xfpregs_get()
115 memcpy(&fpu->fpstate->regs.fxsave, &newstate, sizeof(newstate)); in xfpregs_set()
118 BUILD_BUG_ON(sizeof(fpu->__fpstate.regs.fxsave.xmm_space) != 16 * 16); in xfpregs_set()
120 memset(&fpu->fpstate->regs.fxsave.xmm_space[8*4], 0, 8 * 16); in xfpregs_set()
204 static inline u32 twd_fxsr_to_i387(struct fxregs_state *fxsave) in twd_fxsr_to_i387() argument
207 u32 tos = (fxsave->swd >> 11) & 7; in twd_fxsr_to_i387()
208 u32 twd = (unsigned long) fxsave->twd; in twd_fxsr_to_i387()
215 st = FPREG_ADDR(fxsave, (i - tos) & 7); in twd_fxsr_to_i387()
251 struct fxregs_state *fxsave) in __convert_from_fxsr() argument
254 struct _fpxreg *from = (struct _fpxreg *) &fxsave->st_space[0]; in __convert_from_fxsr()
257 env->cwd = fxsave->cwd | 0xffff0000u; in __convert_from_fxsr()
258 env->swd = fxsave->swd | 0xffff0000u; in __convert_from_fxsr()
259 env->twd = twd_fxsr_to_i387(fxsave); in __convert_from_fxsr()
262 env->fip = fxsave->rip; in __convert_from_fxsr()
263 env->foo = fxsave->rdp; in __convert_from_fxsr()
276 env->fip = fxsave->fip; in __convert_from_fxsr()
277 env->fcs = (u16) fxsave->fcs | ((u32) fxsave->fop << 16); in __convert_from_fxsr()
278 env->foo = fxsave->foo; in __convert_from_fxsr()
279 env->fos = fxsave->fos; in __convert_from_fxsr()
289 __convert_from_fxsr(env, tsk, &tsk->thread.fpu.fpstate->regs.fxsave); in convert_from_fxsr()
292 void convert_to_fxsr(struct fxregs_state *fxsave, in convert_to_fxsr() argument
297 struct _fpxreg *to = (struct _fpxreg *) &fxsave->st_space[0]; in convert_to_fxsr()
300 fxsave->cwd = env->cwd; in convert_to_fxsr()
301 fxsave->swd = env->swd; in convert_to_fxsr()
302 fxsave->twd = twd_i387_to_fxsr(env->twd); in convert_to_fxsr()
303 fxsave->fop = (u16) ((u32) env->fcs >> 16); in convert_to_fxsr()
305 fxsave->rip = env->fip; in convert_to_fxsr()
306 fxsave->rdp = env->foo; in convert_to_fxsr()
309 fxsave->fip = env->fip; in convert_to_fxsr()
310 fxsave->fcs = (env->fcs & 0xffff); in convert_to_fxsr()
311 fxsave->foo = env->foo; in convert_to_fxsr()
312 fxsave->fos = env->fos; in convert_to_fxsr()
324 struct fxregs_state fxsave, *fx; in fpregs_get() local
337 struct membuf mb = { .p = &fxsave, .left = sizeof(fxsave) }; in fpregs_get()
341 fx = &fxsave; in fpregs_get()
343 fx = &fpu->fpstate->regs.fxsave; in fpregs_get()
372 convert_to_fxsr(&fpu->fpstate->regs.fxsave, &env); in fpregs_set()