diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2003-07-10 19:33:20 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2003-07-10 19:33:20 +0000 |
commit | 6c65a67b38f725479688d96d624bd32d05f80df7 (patch) | |
tree | beb58f9305b1fafc1455d1d4958696cd36b184e5 /sys | |
parent | 2455f09608168afaed08d552756e04d58bde6e23 (diff) |
unifdef -UNEW_FPSTATE in attempt to make it more clear
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sparc64/sparc64/trap.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/sys/arch/sparc64/sparc64/trap.c b/sys/arch/sparc64/sparc64/trap.c index e627538c2e0..7bd266c7ac7 100644 --- a/sys/arch/sparc64/sparc64/trap.c +++ b/sys/arch/sparc64/sparc64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.28 2003/07/10 19:23:16 jason Exp $ */ +/* $OpenBSD: trap.c,v 1.29 2003/07/10 19:33:19 jason Exp $ */ /* $NetBSD: trap.c,v 1.73 2001/08/09 01:03:01 eeh Exp $ */ /* @@ -49,8 +49,6 @@ * @(#)trap.c 8.4 (Berkeley) 9/23/93 */ -#define NEW_FPSTATE - #include <sys/param.h> #include <sys/systm.h> #include <sys/proc.h> @@ -455,27 +453,16 @@ trap(tf, type, pc, tstate) * the FPU. */ if (type == T_FPDISABLED) { -#ifndef NEW_FPSTATE - if (fpproc != NULL) { /* someone else had it */ - savefpstate(fpproc->p_md.md_fpstate); - fpproc = NULL; - /* Enable the FPU */ -/* loadfpstate(initfpstate);*/ - } - tf->tf_tstate |= (PSTATE_PEF<<TSTATE_PSTATE_SHIFT); - return; -#else struct proc *newfpproc; - /* New scheme */ - if (CLKF_INTR((struct clockframe *)tf) || !curproc) { + if (CLKF_INTR((struct clockframe *)tf) || !curproc) newfpproc = &proc0; - } else { + else newfpproc = curproc; - } + if (fpproc != newfpproc) { if (fpproc != NULL) { - /* someone else had it, maybe? */ + /* someone else had it, maybe? */ savefpstate(fpproc->p_md.md_fpstate); fpproc = NULL; } @@ -489,7 +476,6 @@ trap(tf, type, pc, tstate) /* Enable the FPU */ tf->tf_tstate |= (PSTATE_PEF<<TSTATE_PSTATE_SHIFT); return; -#endif } goto dopanic; } |