Date: Mon, 3 Jun 2013 18:57:36 +0000 (UTC) From: Steve Kargl <kargl@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r251338 - in head/lib/msun: ld128 ld80 Message-ID: <201306031857.r53IvajA023936@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kargl Date: Mon Jun 3 18:57:35 2013 New Revision: 251338 URL: http://svnweb.freebsd.org/changeset/base/251338 Log: Micro-optimization: move the unary mius operator to operate on a literal constant. Obtained from: bde Modified: head/lib/msun/ld128/s_expl.c head/lib/msun/ld80/s_expl.c Modified: head/lib/msun/ld128/s_expl.c ============================================================================== --- head/lib/msun/ld128/s_expl.c Mon Jun 3 18:53:40 2013 (r251337) +++ head/lib/msun/ld128/s_expl.c Mon Jun 3 18:57:35 2013 (r251338) @@ -261,7 +261,7 @@ expl(long double x) n2 = (unsigned)n % INTERVALS; k = n >> LOG2_INTERVALS; r1 = x - fn * L1; - r2 = -fn * L2; + r2 = fn * -L2; /* Prepare scale factors. */ v.xbits.manh = 0; Modified: head/lib/msun/ld80/s_expl.c ============================================================================== --- head/lib/msun/ld80/s_expl.c Mon Jun 3 18:53:40 2013 (r251337) +++ head/lib/msun/ld80/s_expl.c Mon Jun 3 18:57:35 2013 (r251338) @@ -275,10 +275,10 @@ expl(long double x) /* Depend on the sign bit being propagated: */ k = n >> LOG2_INTERVALS; r1 = x - fn * L1; - r2 = -fn * L2; + r2 = fn * -L2; /* Prepare scale factors. */ - v.xbits.man = 1ULL << 63; + v.e = 1ULL << 63; if (k >= LDBL_MIN_EXP) { v.xbits.expsign = BIAS + k; twopk = v.e;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306031857.r53IvajA023936>