From patchwork Thu Aug 18 19:42:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. Murphy" X-Patchwork-Id: 660521 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 ozlabs.org (Postfix) with ESMTPS id 3sFc2R2PBTz9t0p for ; Fri, 19 Aug 2016 05:42:55 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=claz3gD8; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:in-reply-to:references :in-reply-to:references:message-id; q=dns; s=default; b=cPut7285 N+QBJ7FoX0CBgitfI9UoKOBEUC3qQxRDR1bAFw1Ob6BUJ/uCaG9HTUHwNj7MNowH W6DHKqXHPDqZ6PrkXyxvZ1h2Kehc02Fi1Itf2bOQKJpCKD4ROS3qHoSYhooOUmI5 +xpRzIlPn3RX/8gM2S5hzwxrQKCWkg3bOso= 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:from:to:subject:date:in-reply-to:references :in-reply-to:references:message-id; s=default; bh=KwF/AX7DE7NR/E v2uNkXz+Tdros=; b=claz3gD8JXpWB1jPcXfqBTRdL54FsTy1NilvFF1lXBM+ld w6WIo5xp4aew+t84rGkBjWxOvXG9ckh3zRSlfbdiQpejOm+W02ytzeNP8+H9uFYz RxJ58F/XFAh6h3FEFnQA5Ho317WMRO0ZRtFaezgjh31JU6Bsu7b4CtSfIL+Eo= Received: (qmail 27004 invoked by alias); 18 Aug 2016 19:42:42 -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 26929 invoked by uid 89); 18 Aug 2016 19:42:41 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, RCVD_IN_SEMBACKSCATTER autolearn=no version=3.3.2 spammy=_Float128, float128, _float128, H*m:linux X-HELO: mx0a-001b2d01.pphosted.com X-IBM-Helo: d03dlp02.boulder.ibm.com X-IBM-MailFrom: murphyp@linux.vnet.ibm.com From: "Paul E. Murphy" To: libc-alpha@sourceware.org Subject: [PATCHv2 2/5] ldbl-128: Define and use mathx_hidden_def wrapper to hidden_def Date: Thu, 18 Aug 2016 14:42:29 -0500 In-Reply-To: References: In-Reply-To: References: X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16081819-0020-0000-0000-00000995E096 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00005613; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000181; SDB=6.00746528; UDB=6.00351972; IPR=6.00519063; BA=6.00004668; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00012381; XFM=3.00000011; UTC=2016-08-18 19:42:38 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16081819-0021-0000-0000-000054B09FA7 Message-Id: <794b522acd98f7da80d39d56d2bcb27cfc520e0b.1471548450.git.murphyp@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-08-18_09:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1608180252 This provides an extra macro expansion before invoking the hidden_def macro. This removes the need for ugly workarounds when building these files as float128. * sysdeps/generic/math_private.h: (mathx_hidden_def): New macro. * sysdeps/ieee754/ldbl-128/s_finitel.c: Replace hidden_def usage with mathx_hidden_def. * sysdeps/ieee754/ldbl-128/s_isinfl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_isnanl.c: Likewise. --- sysdeps/generic/math_private.h | 4 ++++ sysdeps/ieee754/ldbl-128/s_finitel.c | 2 +- sysdeps/ieee754/ldbl-128/s_isinfl.c | 2 +- sysdeps/ieee754/ldbl-128/s_isnanl.c | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sysdeps/generic/math_private.h b/sysdeps/generic/math_private.h index cf1865d..08b04e0 100644 --- a/sysdeps/generic/math_private.h +++ b/sysdeps/generic/math_private.h @@ -181,6 +181,10 @@ do { \ } while (0) #endif +/* We need to guarantee an expansion of name when building + ldbl-128 files as another type (e.g _Float128). */ +#define mathx_hidden_def(name) hidden_def(name) + /* Get long double macros from a separate header. */ #include diff --git a/sysdeps/ieee754/ldbl-128/s_finitel.c b/sysdeps/ieee754/ldbl-128/s_finitel.c index ea8a9ba..25450ba 100644 --- a/sysdeps/ieee754/ldbl-128/s_finitel.c +++ b/sysdeps/ieee754/ldbl-128/s_finitel.c @@ -32,5 +32,5 @@ int __finitel(long double x) return (int)((u_int64_t)((hx&0x7fff000000000000LL) -0x7fff000000000000LL)>>63); } -hidden_def (__finitel) +mathx_hidden_def (__finitel) weak_alias (__finitel, finitel) diff --git a/sysdeps/ieee754/ldbl-128/s_isinfl.c b/sysdeps/ieee754/ldbl-128/s_isinfl.c index 03e4d13..0066a57 100644 --- a/sysdeps/ieee754/ldbl-128/s_isinfl.c +++ b/sysdeps/ieee754/ldbl-128/s_isinfl.c @@ -25,5 +25,5 @@ __isinfl (long double x) lx |= -lx; return ~(lx >> 63) & (hx >> 62); } -hidden_def (__isinfl) +mathx_hidden_def (__isinfl) weak_alias (__isinfl, isinfl) diff --git a/sysdeps/ieee754/ldbl-128/s_isnanl.c b/sysdeps/ieee754/ldbl-128/s_isnanl.c index 74960e7..297a669 100644 --- a/sysdeps/ieee754/ldbl-128/s_isnanl.c +++ b/sysdeps/ieee754/ldbl-128/s_isnanl.c @@ -34,5 +34,5 @@ int __isnanl(long double x) hx = 0x7fff000000000000LL - hx; return (int)((u_int64_t)hx>>63); } -hidden_def (__isnanl) +mathx_hidden_def (__isnanl) weak_alias (__isnanl, isnanl)