Module Name:    src
Committed By:   chs
Date:           Mon Feb 27 06:57:45 UTC 2017

Modified Files:
        src/sys/arch/mips/mips: fp.S

Log Message:
in mips_emul_fp(), clear all pending FP exceptions rather than
just a particular one, otherwise the kernel can take another
FPU trap when it writes back the new FCSR value.
discovered via the fesetround() bug that wrote garbage to the FCSR.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/mips/mips/fp.S

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/mips/mips/fp.S
diff -u src/sys/arch/mips/mips/fp.S:1.47 src/sys/arch/mips/mips/fp.S:1.48
--- src/sys/arch/mips/mips/fp.S:1.47	Thu Oct 13 18:54:46 2016
+++ src/sys/arch/mips/mips/fp.S	Mon Feb 27 06:57:45 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: fp.S,v 1.47 2016/10/13 18:54:46 macallan Exp $	*/
+/*	$NetBSD: fp.S,v 1.48 2017/02/27 06:57:45 chs Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -145,7 +145,7 @@ NESTED(mips_emul_fp, CALLFRAME_SIZ, ra)
 #else
 	cfc1	a2, MIPS_FPU_CSR		# get exception register
 	PTR_L	a3, fmt_tbl(v0)			# switch on FUNC & FMT
-	and	a2, a2, ~MIPS_FPU_EXCEPTION_UNIMPL	# clear exception
+	and	a2, a2, ~MIPS_FPU_EXCEPTION_BITS	# clear exception
 	ctc1	a2, MIPS_FPU_CSR
 #endif
 	j	a3

Reply via email to