Module Name: src
Committed By: riastradh
Date: Wed May 29 00:53:20 UTC 2013
Modified Files:
src/lib/libm/arch/i387: fenv.c
src/lib/libm/arch/x86_64: fenv.c
Log Message:
Fix sense of fegetexcept on x86.
Somehow I overlooked this when I fixed feenableexcept and
fedisableexcept last summer.
XXX pullup to 6
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libm/arch/i387/fenv.c
cvs rdiff -u -r1.2 -r1.3 src/lib/libm/arch/x86_64/fenv.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libm/arch/i387/fenv.c
diff -u src/lib/libm/arch/i387/fenv.c:1.4 src/lib/libm/arch/i387/fenv.c:1.5
--- src/lib/libm/arch/i387/fenv.c:1.4 Sat Aug 4 03:53:55 2012
+++ src/lib/libm/arch/i387/fenv.c Wed May 29 00:53:19 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: fenv.c,v 1.4 2012/08/04 03:53:55 riastradh Exp $ */
+/* $NetBSD: fenv.c,v 1.5 2013/05/29 00:53:19 riastradh Exp $ */
/*-
* Copyright (c) 2004-2005 David Schultz <[email protected]>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: fenv.c,v 1.4 2012/08/04 03:53:55 riastradh Exp $");
+__RCSID("$NetBSD: fenv.c,v 1.5 2013/05/29 00:53:19 riastradh Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
@@ -510,5 +510,5 @@ fegetexcept(void)
*/
__fnstcw(&control);
- return (control & FE_ALL_EXCEPT);
+ return (~control & FE_ALL_EXCEPT);
}
Index: src/lib/libm/arch/x86_64/fenv.c
diff -u src/lib/libm/arch/x86_64/fenv.c:1.2 src/lib/libm/arch/x86_64/fenv.c:1.3
--- src/lib/libm/arch/x86_64/fenv.c:1.2 Sat Aug 4 03:53:56 2012
+++ src/lib/libm/arch/x86_64/fenv.c Wed May 29 00:53:19 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: fenv.c,v 1.2 2012/08/04 03:53:56 riastradh Exp $ */
+/* $NetBSD: fenv.c,v 1.3 2013/05/29 00:53:19 riastradh Exp $ */
/*-
* Copyright (c) 2004-2005 David Schultz <das (at) FreeBSD.ORG>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: fenv.c,v 1.2 2012/08/04 03:53:56 riastradh Exp $");
+__RCSID("$NetBSD: fenv.c,v 1.3 2013/05/29 00:53:19 riastradh Exp $");
#include <assert.h>
#include <fenv.h>
@@ -519,6 +519,6 @@ fegetexcept(void)
*/
__fnstcw(&control);
- return (control & FE_ALL_EXCEPT);
+ return (~control & FE_ALL_EXCEPT);
}