Module Name:    src
Committed By:   dsl
Date:           Wed Dec 11 22:06:51 UTC 2013

Modified Files:
        src/sys/arch/amd64/amd64: fpu.c
        src/sys/arch/amd64/include: fpu.h pcb.h

Log Message:
Remove the fields that were used to save the i387 fp state on interrupt.
They were written but never read.
Possibly they should be saved for 32 bit processes, but that might be a relic
  from real i387 where the fpu was actully asynchronous.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/amd64/amd64/fpu.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/amd64/include/fpu.h
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/amd64/include/pcb.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/amd64/amd64/fpu.c
diff -u src/sys/arch/amd64/amd64/fpu.c:1.43 src/sys/arch/amd64/amd64/fpu.c:1.44
--- src/sys/arch/amd64/amd64/fpu.c:1.43	Sun Dec  1 01:05:16 2013
+++ src/sys/arch/amd64/amd64/fpu.c	Wed Dec 11 22:06:51 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpu.c,v 1.43 2013/12/01 01:05:16 christos Exp $	*/
+/*	$NetBSD: fpu.c,v 1.44 2013/12/11 22:06:51 dsl Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.  All
@@ -100,7 +100,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.43 2013/12/01 01:05:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.44 2013/12/11 22:06:51 dsl Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -192,8 +192,6 @@ fputrap(struct trapframe *frame)
 	 */
 	KASSERT(l == curlwp);
 	fxsave(sfp);
-	pcb->pcb_savefpu_i387.fp_ex_tw = sfp->fp_fxsave.fx_ftw;
-	pcb->pcb_savefpu_i387.fp_ex_sw = sfp->fp_fxsave.fx_fsw;
 
 	if (frame->tf_trapno == T_XMM) {
 		mxcsr = sfp->fp_fxsave.fx_mxcsr;

Index: src/sys/arch/amd64/include/fpu.h
diff -u src/sys/arch/amd64/include/fpu.h:1.10 src/sys/arch/amd64/include/fpu.h:1.11
--- src/sys/arch/amd64/include/fpu.h:1.10	Sun Dec  1 01:05:16 2013
+++ src/sys/arch/amd64/include/fpu.h	Wed Dec 11 22:06:51 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpu.h,v 1.10 2013/12/01 01:05:16 christos Exp $	*/
+/*	$NetBSD: fpu.h,v 1.11 2013/12/11 22:06:51 dsl Exp $	*/
 
 #ifndef	_AMD64_FPU_H_
 #define	_AMD64_FPU_H_
@@ -34,11 +34,6 @@ struct savefpu {
 	struct fxsave64 fp_fxsave;	/* see above */
 };
 
-struct savefpu_i387 {
-	uint16_t fp_ex_sw;		/* saved status from last exception */
-	uint16_t fp_ex_tw;		/* saved tag from last exception */
-};
-
 /*
  * The i387 defaults to Intel extended precision mode and round to nearest,
  * with all exceptions masked.

Index: src/sys/arch/amd64/include/pcb.h
diff -u src/sys/arch/amd64/include/pcb.h:1.20 src/sys/arch/amd64/include/pcb.h:1.21
--- src/sys/arch/amd64/include/pcb.h:1.20	Sun Dec  1 01:05:16 2013
+++ src/sys/arch/amd64/include/pcb.h	Wed Dec 11 22:06:51 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcb.h,v 1.20 2013/12/01 01:05:16 christos Exp $	*/
+/*	$NetBSD: pcb.h,v 1.21 2013/12/11 22:06:51 dsl Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -92,8 +92,7 @@ struct pcb {
 	uint64_t pcb_rsp;
 	uint64_t pcb_rbp;
 	uint64_t pcb_usersp;
-	uint32_t pcb_unused;		/* unused */
-	struct	savefpu_i387 pcb_savefpu_i387; /* i387 status on last exception */
+	uint32_t pcb_unused[2];		/* unused */
 	struct	savefpu pcb_savefpu __aligned(16); /* floating point state */
 	uint32_t pcb_unused_1[4];	/* unused */
 	void     *pcb_onfault;		/* copyin/out fault recovery */

Reply via email to