Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libm/src There is some very odd code in s_exp2.c that on...
details: https://anonhg.NetBSD.org/src/rev/9f258243789d
branches: trunk
changeset: 327704:9f258243789d
user: dsl <dsl%NetBSD.org@localhost>
date: Fri Mar 14 22:21:31 2014 +0000
description:
There is some very odd code in s_exp2.c that only works if 'double'
values are rounded to 53 bit mantissa in teh x87 registers.
This hasn't been true since Nov 11 2013.
Forcing a store-load for 'double' in STRICT_ASSIGN() seems to fix things
(at least enough for the few random test cases).
I suspect the code could be changed so that the number of mantissa bits
didn't matter.
diffstat:
lib/libm/src/math_private.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (21 lines):
diff -r a3aeb90e0b00 -r 9f258243789d lib/libm/src/math_private.h
--- a/lib/libm/src/math_private.h Fri Mar 14 21:59:41 2014 +0000
+++ b/lib/libm/src/math_private.h Fri Mar 14 22:21:31 2014 +0000
@@ -11,7 +11,7 @@
/*
* from: @(#)fdlibm.h 5.1 93/09/24
- * $NetBSD: math_private.h,v 1.20 2013/11/19 19:24:34 joerg Exp $
+ * $NetBSD: math_private.h,v 1.21 2014/03/14 22:21:31 dsl Exp $
*/
#ifndef _MATH_PRIVATE_H_
@@ -185,7 +185,7 @@
#define STRICT_ASSIGN(type, lval, rval) do { \
volatile type __lval; \
\
- if (sizeof(type) >= sizeof(double)) \
+ if (sizeof(type) >= sizeof(long double)) \
(lval) = (rval); \
else { \
__lval = (rval); \
Home |
Main Index |
Thread Index |
Old Index