Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libm/arch Mask off the result of feenableexcept and fedi...
details: https://anonhg.NetBSD.org/src/rev/64c0c4e6270a
branches: trunk
changeset: 780698:64c0c4e6270a
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat Aug 04 03:53:55 2012 +0000
description:
Mask off the result of feenableexcept and fedisableexcept on x86.
These shouldn't return bits outside FE_ALL_EXCEPT.
diffstat:
lib/libm/arch/i387/fenv.c | 8 ++++----
lib/libm/arch/x86_64/fenv.c | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diffs (72 lines):
diff -r 69d307c34a2d -r 64c0c4e6270a lib/libm/arch/i387/fenv.c
--- a/lib/libm/arch/i387/fenv.c Sat Aug 04 03:52:46 2012 +0000
+++ b/lib/libm/arch/i387/fenv.c Sat Aug 04 03:53:55 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fenv.c,v 1.3 2010/08/01 06:34:38 taca Exp $ */
+/* $NetBSD: fenv.c,v 1.4 2012/08/04 03:53:55 riastradh Exp $ */
/*-
* Copyright (c) 2004-2005 David Schultz <das%FreeBSD.ORG@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: fenv.c,v 1.3 2010/08/01 06:34:38 taca Exp $");
+__RCSID("$NetBSD: fenv.c,v 1.4 2012/08/04 03:53:55 riastradh Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
@@ -472,7 +472,7 @@
__ldmxcsr(mxcsr);
}
- return (~omask);
+ return (FE_ALL_EXCEPT & ~omask);
}
int
@@ -496,7 +496,7 @@
__ldmxcsr(mxcsr);
}
- return (~omask);
+ return (FE_ALL_EXCEPT & ~omask);
}
int
diff -r 69d307c34a2d -r 64c0c4e6270a lib/libm/arch/x86_64/fenv.c
--- a/lib/libm/arch/x86_64/fenv.c Sat Aug 04 03:52:46 2012 +0000
+++ b/lib/libm/arch/x86_64/fenv.c Sat Aug 04 03:53:55 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fenv.c,v 1.1 2010/07/31 21:47:53 joerg Exp $ */
+/* $NetBSD: fenv.c,v 1.2 2012/08/04 03:53:56 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.1 2010/07/31 21:47:53 joerg Exp $");
+__RCSID("$NetBSD: fenv.c,v 1.2 2012/08/04 03:53:56 riastradh Exp $");
#include <assert.h>
#include <fenv.h>
@@ -483,7 +483,7 @@
mxcsr &= ~(mask << _SSE_EMASK_SHIFT);
__ldmxcsr(mxcsr);
- return (~omask);
+ return (FE_ALL_EXCEPT & ~omask);
}
@@ -505,7 +505,7 @@
mxcsr |= mask << _SSE_EMASK_SHIFT;
__ldmxcsr(mxcsr);
- return (~omask);
+ return (FE_ALL_EXCEPT & ~omask);
}
int
Home |
Main Index |
Thread Index |
Old Index