From patchwork Wed Jun 5 22:45:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gabriel F. T. Gomes" X-Patchwork-Id: 33035 Received: (qmail 86949 invoked by alias); 5 Jun 2019 22:46:10 -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 86940 invoked by uid 89); 5 Jun 2019 22:46:09 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy= X-HELO: mx0a-001b2d01.pphosted.com Date: Wed, 5 Jun 2019 19:45:57 -0300 From: "Gabriel F. T. Gomes" To: Adhemerval Zanella Cc: Subject: Re: [PATCH 12/28] math: Use wordsize-64 version for isnan In-Reply-To: <20190329133529.22523-13-adhemerval.zanella@linaro.org> References: <20190329133529.22523-1-adhemerval.zanella@linaro.org> <20190329133529.22523-13-adhemerval.zanella@linaro.org> MIME-Version: 1.0 x-cbid: 19060522-0020-0000-0000-00000EF4B89A X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00011221; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000286; SDB=6.01213781; UDB=6.00637978; IPR=6.00994855; MB=3.00027199; MTD=3.00000008; XFM=3.00000015; UTC=2019-06-05 22:46:05 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19060522-0021-0000-0000-0000661E2E74 Message-Id: <20190605194557.1b6d97f8@tereshkova.br.ibm.com> On Fri, Mar 29 2019, Adhemerval Zanella wrote: > > - The resulting binary difference on 32 bits architecture is minimum > for the non hotspot symbol. I don't actually understand what the impact on 32-bits platforms would be, so I can't comment on that, but, if this patch turns out to be problematic for 32-bits, we could patch sysdeps/ieee754/ldbl-opt files to be mindful of __WORDSIZE and selectively include files from sysdeps/ieee754/dbl-64 or sysdeps/ieee754/dbl-64/wordsize-64 (see attached patch for an explanation of what I mean). My point in raising this is that the subsequent patch [1] benefits from this current patch (or, alternatively, from the attached patch, since they have the same outcame, as expected). So, if this patch gets objections we could go with the alternative. [1] https://sourceware.org/ml/libc-alpha/2019-03/msg00674.html diff --git a/sysdeps/ieee754/ldbl-opt/s_finite.c b/sysdeps/ieee754/ldbl-opt/s_finite.c index 7d3ab0068d..85ad5e625a 100644 --- a/sysdeps/ieee754/ldbl-opt/s_finite.c +++ b/sysdeps/ieee754/ldbl-opt/s_finite.c @@ -1,5 +1,10 @@ +#include #include +#if __WORDSIZE == 64 +#include +#else #include +#endif weak_alias (__finite, ___finite) #if IS_IN (libm) # if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) diff --git a/sysdeps/ieee754/ldbl-opt/s_isinf.c b/sysdeps/ieee754/ldbl-opt/s_isinf.c index 1f760a0320..da5dc01601 100644 --- a/sysdeps/ieee754/ldbl-opt/s_isinf.c +++ b/sysdeps/ieee754/ldbl-opt/s_isinf.c @@ -1,5 +1,10 @@ +#include #include +#if __WORDSIZE == 64 +#include +#else #include +#endif #if !IS_IN (libm) # if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0) compat_symbol (libc, __isinf, __isinfl, GLIBC_2_0); diff --git a/sysdeps/ieee754/ldbl-opt/s_isnan.c b/sysdeps/ieee754/ldbl-opt/s_isnan.c index 33f57f1955..99ee75ce34 100644 --- a/sysdeps/ieee754/ldbl-opt/s_isnan.c +++ b/sysdeps/ieee754/ldbl-opt/s_isnan.c @@ -1,5 +1,10 @@ +#include #include +#if __WORDSIZE == 64 +#include +#else #include +#endif #if !IS_IN (libm) # if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0) compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);