diff options
author | Per Fogelstrom <pefo@cvs.openbsd.org> | 2004-11-02 21:05:35 +0000 |
---|---|---|
committer | Per Fogelstrom <pefo@cvs.openbsd.org> | 2004-11-02 21:05:35 +0000 |
commit | 36ca6a4fa733d6614e6bf3a50abfa7b8cb93f7d0 (patch) | |
tree | d0df9dd515742a5b05051a1945e58a607a158b63 /sys/arch/mips64 | |
parent | dcc492df3588c335221eb67f6e3bd46046d6d214 (diff) |
Fix problem with floating point restore at sigreturn.
Regress lib/libpthread/preemption_float now passes.
Diffstat (limited to 'sys/arch/mips64')
-rw-r--r-- | sys/arch/mips64/mips64/sendsig.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/arch/mips64/mips64/sendsig.c b/sys/arch/mips64/mips64/sendsig.c index bb904f60d5c..d8e6284fe70 100644 --- a/sys/arch/mips64/mips64/sendsig.c +++ b/sys/arch/mips64/mips64/sendsig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sendsig.c,v 1.5 2004/09/17 13:31:22 miod Exp $ */ +/* $OpenBSD: sendsig.c,v 1.6 2004/11/02 21:05:34 pefo Exp $ */ /* * Copyright (c) 1990 The Regents of the University of California. @@ -72,6 +72,8 @@ #include <machine/regnum.h> +struct proc *machFPCurProcPtr; /* pointer to last proc to use FP */ + /* * WARNING: code in locore.s assumes the layout shown for sf_signum * thru sf_handler so... don't screw with them! @@ -263,6 +265,9 @@ sys_sigreturn(p, v, retval) regs->pc = scp->sc_pc; regs->mullo = scp->mullo; regs->mulhi = scp->mulhi; + regs->sr &= ~SR_COP_1_BIT; /* Zap current FP state */ + if (p == machFPCurProcPtr) + machFPCurProcPtr = NULL; bcopy((caddr_t)&scp->sc_regs[1], (caddr_t)®s->ast, sizeof(scp->sc_regs) - sizeof(register_t)); if (scp->sc_fpused) |