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).
This commit is contained in:
Bruce Evans 2008-01-19 22:05:14 +00:00
parent 2d6d5e1604
commit 5b62c3808e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=175503

View File

@ -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