From owner-svn-src-head@FreeBSD.ORG Sat Oct 13 19:53:12 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1BC95805; Sat, 13 Oct 2012 19:53:12 +0000 (UTC) (envelope-from kargl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DFEFE8FC0A; Sat, 13 Oct 2012 19:53:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9DJrBEC096284; Sat, 13 Oct 2012 19:53:11 GMT (envelope-from kargl@svn.freebsd.org) Received: (from kargl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9DJrBi0096282; Sat, 13 Oct 2012 19:53:11 GMT (envelope-from kargl@svn.freebsd.org) Message-Id: <201210131953.q9DJrBi0096282@svn.freebsd.org> From: Steve Kargl Date: Sat, 13 Oct 2012 19:53:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241516 - head/lib/msun/ld80 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Oct 2012 19:53:12 -0000 Author: kargl Date: Sat Oct 13 19:53:11 2012 New Revision: 241516 URL: http://svn.freebsd.org/changeset/base/241516 Log: * Update the comment that explains the choice of values in the table and the requirement on trailing zero bits. * Remove the __aligned() compiler directives as these were found to have a negative effect on the produced code. Submitted by: bde Approved by: das (mentor) Modified: head/lib/msun/ld80/s_expl.c Modified: head/lib/msun/ld80/s_expl.c ============================================================================== --- head/lib/msun/ld80/s_expl.c Sat Oct 13 19:37:58 2012 (r241515) +++ head/lib/msun/ld80/s_expl.c Sat Oct 13 19:53:11 2012 (r241516) @@ -64,7 +64,7 @@ o_threshold = LD80C(0xb17217f7d1cf79ab, /* log(2**(-16381-64-1)) rounded towards zero: */ u_threshold = LD80C(0xb21dfe7f09e2baa9, 13, -11399.4985314888605581L); -static const double __aligned(64) +static const double /* * ln2/INTERVALS = L1+L2 (hi+lo decomposition for multiplication). L1 must * have at least 22 (= log2(|LDBL_MIN_EXP-extras|) + log2(INTERVALS)) lowest @@ -86,17 +86,18 @@ P6 = 1.3888891738560272e-3; /* 0x16c1 /* * 2^(i/INTERVALS) for i in [0,INTERVALS] is represented by two values where - * the first 53 bits of the significand is stored in hi and the next 53 - * bits are in lo. Tang's paper states that the trailing 6 bits of hi should + * the first 53 bits of the significand are stored in hi and the next 53 + * bits are in lo. Tang's paper states that the trailing 6 bits of hi must * be zero for his algorithm in both single and double precision, because * the table is re-used in the implementation of expm1() where a floating - * point addition involving hi must be exact. The conversion of a 53-bit - * double into a 64-bit long double gives 11 trailing bit, which are zero. + * point addition involving hi must be exact. Here hi is double, so + * converting it to long double gives 11 trailing zero bits. */ static const struct { double hi; double lo; -} s[INTERVALS] __aligned(16) = { +/* XXX should rename 's'. */ +} s[INTERVALS] = { 0x1p+0, 0x0p+0, 0x1.0163da9fb3335p+0, 0x1.b61299ab8cdb7p-54, 0x1.02c9a3e778060p+0, 0x1.dcdef95949ef4p-53,