From patchwork Wed Oct 4 20:33:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 23334 Received: (qmail 86395 invoked by alias); 4 Oct 2017 20:33:37 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 86385 invoked by uid 89); 4 Oct 2017 20:33:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Date: Wed, 4 Oct 2017 20:33:27 +0000 From: Joseph Myers To: Subject: Use libm_alias_double for dbl-64 fma [committed] Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) This patch makes dbl-64 fma use libm_alias_double. The ldbl-opt version is removed. The sparc32 version no longer needs to handle compat symbols, while alpha needs a new wrapper to avoid getting the ldbl-128 version (where ldbl-opt is earlier in the list of sysdeps directories, so previously fma came from there). Tested for x86_64, and tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by the patch. Committed. 2017-10-04 Joseph Myers * sysdeps/ieee754/dbl-64/s_fma.c: Include . (fma): Define using libm_alias_double. * sysdeps/ieee754/ldbl-opt/s_fma.c: Remove file. * sysdeps/sparc/sparc32/fpu/s_fma.c: Do not include . (fmal): Do not define as compat symbol here. * sysdeps/alpha/fpu/s_fma.c: New file. diff --git a/sysdeps/alpha/fpu/s_fma.c b/sysdeps/alpha/fpu/s_fma.c new file mode 100644 index 0000000..8f62605 --- /dev/null +++ b/sysdeps/alpha/fpu/s_fma.c @@ -0,0 +1,2 @@ +/* Always use dbl-64 version because long double is emulated in software. */ +#include diff --git a/sysdeps/ieee754/dbl-64/s_fma.c b/sysdeps/ieee754/dbl-64/s_fma.c index 68c8515..3a5a885 100644 --- a/sysdeps/ieee754/dbl-64/s_fma.c +++ b/sysdeps/ieee754/dbl-64/s_fma.c @@ -22,6 +22,7 @@ #include #include #include +#include #include /* This implementation uses rounding to odd to avoid problems with @@ -292,10 +293,5 @@ __fma (double x, double y, double z) } } #ifndef __fma -weak_alias (__fma, fma) -#endif - -#ifdef NO_LONG_DOUBLE -strong_alias (__fma, __fmal) -weak_alias (__fmal, fmal) +libm_alias_double (__fma, fma) #endif diff --git a/sysdeps/ieee754/ldbl-opt/s_fma.c b/sysdeps/ieee754/ldbl-opt/s_fma.c deleted file mode 100644 index 1723c5c..0000000 --- a/sysdeps/ieee754/ldbl-opt/s_fma.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#include -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __fma, fmal, GLIBC_2_1); -#endif diff --git a/sysdeps/sparc/sparc32/fpu/s_fma.c b/sysdeps/sparc/sparc32/fpu/s_fma.c index bfdcb23..8f62605 100644 --- a/sysdeps/sparc/sparc32/fpu/s_fma.c +++ b/sysdeps/sparc/sparc32/fpu/s_fma.c @@ -1,6 +1,2 @@ /* Always use dbl-64 version because long double is emulated in software. */ -#include #include -#if LONG_DOUBLE_COMPAT (libm, GLIBC_2_1) -compat_symbol (libm, __fma, fmal, GLIBC_2_1); -#endif