Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/amd64 Remove the fields that were used to save the ...



details:   https://anonhg.NetBSD.org/src/rev/3a91d4ac481e
branches:  trunk
changeset: 325203:3a91d4ac481e
user:      dsl <dsl%NetBSD.org@localhost>
date:      Wed Dec 11 22:06:51 2013 +0000

description:
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.

diffstat:

 sys/arch/amd64/amd64/fpu.c   |  6 ++----
 sys/arch/amd64/include/fpu.h |  7 +------
 sys/arch/amd64/include/pcb.h |  5 ++---
 3 files changed, 5 insertions(+), 13 deletions(-)

diffs (67 lines):

diff -r 674757b5e244 -r 3a91d4ac481e sys/arch/amd64/amd64/fpu.c
--- a/sys/arch/amd64/amd64/fpu.c        Wed Dec 11 17:31:55 2013 +0000
+++ b/sys/arch/amd64/amd64/fpu.c        Wed Dec 11 22:06:51 2013 +0000
@@ -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 @@
         */
        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;
diff -r 674757b5e244 -r 3a91d4ac481e sys/arch/amd64/include/fpu.h
--- a/sys/arch/amd64/include/fpu.h      Wed Dec 11 17:31:55 2013 +0000
+++ b/sys/arch/amd64/include/fpu.h      Wed Dec 11 22:06:51 2013 +0000
@@ -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 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.
diff -r 674757b5e244 -r 3a91d4ac481e sys/arch/amd64/include/pcb.h
--- a/sys/arch/amd64/include/pcb.h      Wed Dec 11 17:31:55 2013 +0000
+++ b/sys/arch/amd64/include/pcb.h      Wed Dec 11 22:06:51 2013 +0000
@@ -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 @@
        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 */



Home | Main Index | Thread Index | Old Index