Lionel Sambuc 0a6a1f1d05 NetBSD re-synchronization of the source tree
This brings our tree to NetBSD 7.0, as found on -current on the
10-10-2015.

This updates:
 - LLVM to 3.6.1
 - GCC to GCC 5.1
 - Replace minix/commands/zdump with usr.bin/zdump
 - external/bsd/libelf has moved to /external/bsd/elftoolchain/
 - Import ctwm
 - Drop sprintf from libminc

Change-Id: I149836ac18e9326be9353958bab9b266efb056f0
2016-01-13 20:32:14 +01:00

45 lines
1.2 KiB
C

/* $NetBSD: fpu.h,v 1.6 2014/02/25 22:16:52 dsl Exp $ */
#ifndef _X86_FPU_H_
#define _X86_FPU_H_
#include <x86/cpu_extended_state.h>
#ifdef _KERNEL
struct cpu_info;
struct lwp;
struct trapframe;
void fpuinit(struct cpu_info *);
void fpusave_lwp(struct lwp *, bool);
void fpusave_cpu(bool);
void fpu_set_default_cw(struct lwp *, unsigned int);
void fputrap(struct trapframe *);
void fpudna(struct trapframe *);
void process_xmm_to_s87(const struct fxsave *, struct save87 *);
void process_s87_to_xmm(const struct save87 *, struct fxsave *);
/* Set all to defaults (eg during exec) */
void fpu_save_area_clear(struct lwp *, unsigned int);
/* Reset control words only - for signal handlers */
void fpu_save_area_reset(struct lwp *);
/* Copy data outside pcb during fork */
void fpu_save_area_fork(struct pcb *, const struct pcb *);
/* Load FP registers with user-supplied values */
void process_write_fpregs_xmm(struct lwp *lwp, const struct fxsave *fpregs);
void process_write_fpregs_s87(struct lwp *lwp, const struct save87 *fpregs);
/* Save FP registers for copy to userspace */
void process_read_fpregs_xmm(struct lwp *lwp, struct fxsave *fpregs);
void process_read_fpregs_s87(struct lwp *lwp, struct save87 *fpregs);
#endif
#endif /* _X86_FPU_H_ */