From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118540 invoked by alias); 3 Dec 2019 08:27:32 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 118532 invoked by uid 89); 3 Dec 2019 08:27:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx0a-001b2d01.pphosted.com Subject: Re: [PATCH 13/13] Use GCC builtins for copysign functions if desired. To: Joseph Myers Cc: libc-alpha@sourceware.org References: <1575297977-2589-1-git-send-email-stli@linux.ibm.com> <1575297977-2589-14-git-send-email-stli@linux.ibm.com> From: Stefan Liebler Date: Tue, 03 Dec 2019 08:27:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit x-cbid: 19120308-0020-0000-0000-00000392EE1E X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19120308-0021-0000-0000-000021EA0D3D Message-Id: X-SW-Source: 2019-12/txt/msg00071.txt.bz2 On 12/2/19 10:00 PM, Joseph Myers wrote: > On Mon, 2 Dec 2019, Stefan Liebler wrote: > >> This patch is using the corresponding GCC builtin for copysignf, copysign, >> copysignl and copysignf128 if the USE_FUNCTION_BUILTIN macros are defined to one >> in math-use-builtins.h. > > I believe this is always safe for these implementations (the only case > where GCC might not expand copysign functions inline is copysignl for IBM > long double, in the soft-float case). > Thus you mean we can do the following preset in sysdeps/generic/math-use-builtins.h? #define USE_COPYSIGN_BUILTIN 1 #define USE_COPYSIGNF_BUILTIN 1 #define USE_COPYSIGNL_BUILTIN 0 #define USE_COPYSIGNF128_BUILTIN 0 Or even also set USE_COPYSIGNL_BUILTIN to one as IBM long double has its own implementation in ./sysdeps/ieee754/ldbl-128ibm/s_copysignl.c. On the other hand, I'm not able to run tests on the different architectures. Thus the safest way would be to leave all those macros set to zero and let the architectures decide. In each case, I would prefer to set those macros to one in a separate patch. Then this patch could be reverted in case of failing on one architecture.