From 2005bbb395bb7f0b8875c19bc5414a4cc62fbdac Mon Sep 17 00:00:00 2001 From: bde Date: Sat, 19 Jan 2008 22:05:14 +0000 Subject: Do an ordinary assignment in STRICT_ASSIGN() except for floats until there is a problem with non-floats (when i386 defaults to extra precision). This essentially restores yesterday's behaviour for doubles on i386 (since generic rint() isn't used and everywhere else assumed working assignment), but for arches that use the generic rint() it finishes restoring some of 1995's behaviour (don't waste time doing unnecessary store/load). --- lib/msun/src/math_private.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/msun/src') diff --git a/lib/msun/src/math_private.h b/lib/msun/src/math_private.h index 15ef4fb..3514712 100644 --- a/lib/msun/src/math_private.h +++ b/lib/msun/src/math_private.h @@ -164,8 +164,12 @@ do { \ #define STRICT_ASSIGN(type, lval, rval) do { \ volatile type __lval; \ \ - __lval = (rval); \ - (lval) = __lval; \ + if (sizeof(type) >= sizeof(double)) \ + (lval) = (rval); \ + else { \ + __lval = (rval); \ + (lval) = __lval; \ + } \ } while (0) #endif #endif -- cgit v1.1