Date: Mon, 24 Jun 2013 19:12:17 +0000 (UTC) From: Eitan Adler <eadler@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252170 - head/lib/msun/src Message-ID: <201306241912.r5OJCHi9003632@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: eadler Date: Mon Jun 24 19:12:17 2013 New Revision: 252170 URL: http://svnweb.freebsd.org/changeset/base/252170 Log: Make the order of operations for lib/msun more clear. Tested with md5 sum of object code Reported by: swildner@DragonFlyBSD.org Submitted by: bde Modified: head/lib/msun/src/s_fma.c head/lib/msun/src/s_fmal.c Modified: head/lib/msun/src/s_fma.c ============================================================================== --- head/lib/msun/src/s_fma.c Mon Jun 24 18:41:28 2013 (r252169) +++ head/lib/msun/src/s_fma.c Mon Jun 24 19:12:17 2013 (r252170) @@ -117,7 +117,7 @@ add_and_denormalize(double a, double b, if (sum.lo != 0) { EXTRACT_WORD64(hibits, sum.hi); bits_lost = -((int)(hibits >> 52) & 0x7ff) - scale + 1; - if (bits_lost != 1 ^ (int)(hibits & 1)) { + if ((bits_lost != 1) ^ (int)(hibits & 1)) { /* hibits += (int)copysign(1.0, sum.hi * sum.lo) */ EXTRACT_WORD64(lobits, sum.lo); hibits += 1 - (((hibits ^ lobits) >> 62) & 2); Modified: head/lib/msun/src/s_fmal.c ============================================================================== --- head/lib/msun/src/s_fmal.c Mon Jun 24 18:41:28 2013 (r252169) +++ head/lib/msun/src/s_fmal.c Mon Jun 24 19:12:17 2013 (r252170) @@ -113,7 +113,7 @@ add_and_denormalize(long double a, long if (sum.lo != 0) { u.e = sum.hi; bits_lost = -u.bits.exp - scale + 1; - if (bits_lost != 1 ^ (int)(u.bits.manl & 1)) + if ((bits_lost != 1) ^ (int)(u.bits.manl & 1)) sum.hi = nextafterl(sum.hi, INFINITY * sum.lo); } return (ldexp(sum.hi, scale));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306241912.r5OJCHi9003632>