summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/fpu.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c
index f30c073..d9c967c 100644
--- a/sys/amd64/amd64/fpu.c
+++ b/sys/amd64/amd64/fpu.c
@@ -318,13 +318,15 @@ fpuinitstate(void *arg __unused)
cpu_mxcsr_mask = 0xFFBF;
/*
- * The fninit instruction does not modify XMM registers. The
- * fpusave call dumped the garbage contained in the registers
- * after reset to the initial state saved. Clear XMM
- * registers file image to make the startup program state and
- * signal handler XMM register content predictable.
+ * The fninit instruction does not modify XMM registers or x87
+ * registers (MM/ST). The fpusave call dumped the garbage
+ * contained in the registers after reset to the initial state
+ * saved. Clear XMM and x87 registers file image to make the
+ * startup program state and signal handler XMM/x87 register
+ * content predictable.
*/
- bzero(&fpu_initialstate->sv_xmm[0], sizeof(struct xmmacc));
+ bzero(fpu_initialstate->sv_fp, sizeof(fpu_initialstate->sv_fp));
+ bzero(fpu_initialstate->sv_xmm, sizeof(fpu_initialstate->sv_xmm));
/*
* Create a table describing the layout of the CPU Extended
@@ -375,7 +377,7 @@ fpuexit(struct thread *td)
}
int
-fpuformat()
+fpuformat(void)
{
return (_MC_FPFMT_XMM);
@@ -661,7 +663,8 @@ fpudna(void)
* fpu_initialstate, to ignite the XSAVEOPT
* tracking engine.
*/
- bcopy(fpu_initialstate, curpcb->pcb_save, cpu_max_ext_state_size);
+ bcopy(fpu_initialstate, curpcb->pcb_save,
+ cpu_max_ext_state_size);
fpurestore(curpcb->pcb_save);
if (curpcb->pcb_initial_fpucw != __INITIAL_FPUCW__)
fldcw(curpcb->pcb_initial_fpucw);
@@ -676,7 +679,7 @@ fpudna(void)
}
void
-fpudrop()
+fpudrop(void)
{
struct thread *td;
OpenPOWER on IntegriCloud