diff options
author | mini <mini@FreeBSD.org> | 2002-09-16 19:25:41 +0000 |
---|---|---|
committer | mini <mini@FreeBSD.org> | 2002-09-16 19:25:41 +0000 |
commit | 62e41a5a7c826f21a8548bd3d7fcbc218809544e (patch) | |
tree | f68cce90cf752f653302c6c5c0876070f6fff7ab /sys/amd64/include/fpu.h | |
parent | d0ffcf396dc1f28a9d3e188b2dd0a72ad4838880 (diff) | |
download | FreeBSD-src-62e41a5a7c826f21a8548bd3d7fcbc218809544e.zip FreeBSD-src-62e41a5a7c826f21a8548bd3d7fcbc218809544e.tar.gz |
Add kernel support needed for the KSE-aware libpthread:
- Maintain fpu state across signals.
- Save and restore FPU state properly in ucontext_t's.
Reviewed by: deischen, julian
Approved by: -arch
Diffstat (limited to 'sys/amd64/include/fpu.h')
-rw-r--r-- | sys/amd64/include/fpu.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/amd64/include/fpu.h b/sys/amd64/include/fpu.h index 4746f5c..0b66265 100644 --- a/sys/amd64/include/fpu.h +++ b/sys/amd64/include/fpu.h @@ -73,7 +73,7 @@ struct fpacc87 { struct save87 { struct env87 sv_env; /* floating point control/status */ struct fpacc87 sv_ac[8]; /* accumulator contents, 0-7 */ - u_long sv_ex_sw; /* status word for last exception */ + u_char sv_pad0[4]; /* padding for (now unused) saved status word */ /* * Bogus padding for emulators. Emulators should use their own * struct and arrange to store into this struct (ending here) @@ -112,8 +112,7 @@ struct savexmm { u_char fp_pad[6]; /* padding */ } sv_fp[8]; struct xmmacc sv_xmm[8]; - u_long sv_ex_sw; /* status word for last exception */ - u_char sv_pad[220]; + u_char sv_pad[224]; } __attribute__((aligned(16))); union savefpu { @@ -142,9 +141,13 @@ union savefpu { #ifdef _KERNEL int npxdna(void); +void npxdrop(void); void npxexit(struct thread *td); -void npxinit(int control); +int npxformat(void); +int npxgetregs(struct thread *td, union savefpu *addr); +void npxinit(u_short control); void npxsave(union savefpu *addr); +void npxsetregs(struct thread *td, union savefpu *addr); int npxtrap(void); #endif |