From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 6C5981F619 for ; Mon, 24 Feb 2020 14:58:41 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=qd3cFfpWyTiqwvBM GGOeEp8zropNih3TFc3o51706XXC/wqYPNv9SpU5Qv8lTV3ZL+J8hQSlKDEI0GA6 3U29J4t+lz2fqOacthap+odFa1b1RGAlEJ/CFSTXJRYEplaSxWMULPqqbvjoUgTh bS1KxFQ+ZRNRiOgossmkZkMx8Z4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=jh/oJrFmLuV3YDzC07tXq6 tU04k=; b=w+Pw+3hIQtdujPG6cKgNXIaSA7uAwC5VlReJHwlV10QcMHHqPaEqDh P8uknuy4eJBr9tSE/QxuTk0Wwn3tuHCQU5G3AIsHAOo+GNn0sqg+KJW1oewx4aFq KEU7xR94LgRgg/vfFjTJ4HPkhT/vfo9Ru7SfphmQq36jD7IE43kAY= Received: (qmail 92949 invoked by alias); 24 Feb 2020 14:58:38 -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 Received: (qmail 92936 invoked by uid 89); 24 Feb 2020 14:58:38 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mx0a-001b2d01.pphosted.com Subject: Re: [PATCH 3/6] ldbl-128ibm-compat: Redirect long double functions to f128/ieee128 functions To: libc-alpha@sourceware.org References: <3f4d36225559ca4c84dcac78b31f8fd9bf81c74a.1580757509.git.murphyp@linux.vnet.ibm.com> From: Paul E Murphy Message-ID: Date: Mon, 24 Feb 2020 08:58:32 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <3f4d36225559ca4c84dcac78b31f8fd9bf81c74a.1580757509.git.murphyp@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 2/3/20 3:10 PM, Paul E. Murphy wrote: > From: Tulio Magno Quites Machado Filho > > Modify the headers to redirect long double functions to global __*f128 > symbols or to __*ieee128 otherwise. > > Most of the functions in math.h benefit from the infrastructure already > available for __LDBL_COMPAT. The only exceptions are nexttowardf and > nexttoward that need especial treatment. > > Both math/bits/mathcalls-helper-functions.h and math/bits/mathcalls.h > were modified in order to provide alternative redirection destinations > that are essential to support functions that should not be redirected to > the same name pattern of the rest of the functions, i.e.: __fpclassify, > __signbit, __iseqsig, __issignaling, isinf, finite and isnan, which will > be redirected to __*f128 instead of __*ieee128 used for the rest. > --- > include/math.h | 9 ++- > math/bits/mathcalls-helper-functions.h | 18 +++--- > math/bits/mathcalls.h | 9 ++- > math/math.h | 59 ++++++++++++++++++- > .../ieee754/ldbl-128ibm/bits/iscanonical.h | 8 ++- > 5 files changed, 85 insertions(+), 18 deletions(-) I think the majority of this patch is OK. My only contribution was to fixup against the deprecation of the finite entry points. The naming of the nexttoward ABI is a bit awkward, but I proffer no better solutions. If there are no requests for improvement, or objections, I will commit this and the following patch 4, the equivalent support for complex.h, on Friday. > diff --git a/math/math.h b/math/math.h > index e13b3f3a29..1692ff4a45 100644 > --- a/math/math.h > +++ b/math/math.h > @@ -283,6 +283,10 @@ enum > extern type __MATH_PRECNAME(function,suffix) args __THROW > #define __MATHDECL_1(type, function, suffix, args) \ > __MATHDECL_1_IMPL(type, function, suffix, args) > +/* Ignore the alias by default. The alias is only useful with > + redirections. */ > +#define __MATHDECL_ALIAS(type, function, suffix, args, alias) \ > + __MATHDECL_1(type, function, suffix, args) > > #define __MATHREDIR(type, function, suffix, args, to) \ > extern type __REDIRECT_NTH (__MATH_PRECNAME (function, suffix), args, to) > @@ -338,6 +342,35 @@ extern long double __REDIRECT_NTH (nexttowardl, > # undef __MATHDECL_1 > # define __MATHDECL_1(type, function,suffix, args) \ > __MATHREDIR(type, function, suffix, args, __CONCAT(function,suffix)) > + > +# elif __LONG_DOUBLE_USES_FLOAT128 == 1 > +# ifdef __REDIRECT_NTH > +# ifdef __USE_ISOC99 > +extern float __REDIRECT_NTH (nexttowardf, (float __x, long double __y), > + __nexttowardf_to_ieee128) > + __attribute__ ((__const__)); > +extern double __REDIRECT_NTH (nexttoward, (double __x, long double __y), > + __nexttoward_to_ieee128) > + __attribute__ ((__const__));