diff options
| author | dsl <dsl@NetBSD.org> | 2014-03-14 22:21:31 +0000 |
|---|---|---|
| committer | dsl <dsl@NetBSD.org> | 2014-03-14 22:21:31 +0000 |
| commit | 1d4a5d2eede934e0e04bbfbf3fcd6b8a060ec330 (patch) | |
| tree | 32b6c275e52e01522bc14daf24ad44617c365211 /lib/libm/src | |
| parent | 0b6cf9e7ef69082c5b5566d4af9d082798cf93b4 (diff) | |
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 (limited to 'lib/libm/src')
| -rw-r--r-- | lib/libm/src/math_private.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libm/src/math_private.h b/lib/libm/src/math_private.h index 05596179947..29ce4844d98 100644 --- a/lib/libm/src/math_private.h +++ b/lib/libm/src/math_private.h @@ -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 @@ do { \ #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); \ |
