Home | History | Annotate | Line # | Download | only in include
fpu.h revision 1.4
      1 /*	$NetBSD: fpu.h,v 1.4 2014/02/15 22:20:42 dsl Exp $	*/
      2 
      3 #ifndef	_X86_FPU_H_
      4 #define	_X86_FPU_H_
      5 
      6 #include <x86/cpu_extended_state.h>
      7 
      8 #ifdef _KERNEL
      9 
     10 struct cpu_info;
     11 struct lwp;
     12 struct trapframe;
     13 
     14 void fpuinit(struct cpu_info *);
     15 void fpusave_lwp(struct lwp *, bool);
     16 void fpusave_cpu(bool);
     17 
     18 void fputrap(struct trapframe *);
     19 void fpudna(struct trapframe *);
     20 
     21 void process_xmm_to_s87(const struct fxsave *, struct save87 *);
     22 void process_s87_to_xmm(const struct save87 *, struct fxsave *);
     23 
     24 /* Set all to defaults (eg during exec) */
     25 void fpu_save_area_clear(struct lwp *, unsigned int);
     26 /* Reset control words only - for signal handlers */
     27 void fpu_save_area_reset(struct lwp *);
     28 
     29 /* Load FP registers with user-supplied values */
     30 void process_write_fpregs_xmm(struct lwp *lwp, const struct fxsave *fpregs);
     31 void process_write_fpregs_s87(struct lwp *lwp, const struct save87 *fpregs);
     32 
     33 /* Save FP registers for copy to userspace */
     34 void process_read_fpregs_xmm(struct lwp *lwp, struct fxsave *fpregs);
     35 void process_read_fpregs_s87(struct lwp *lwp, struct save87 *fpregs);
     36 
     37 #endif
     38 
     39 #endif /* _X86_FPU_H_ */
     40