From patchwork Tue Sep 18 13:24:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 971106 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-95912-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="yyg3q2C4"; dkim-atps=neutral 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 42F3dm5Crnz9sB5 for ; Tue, 18 Sep 2018 23:25:32 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=h2XpcZeYh2nkhwVr8KsNV71tgKPhZ NbUS4min6AV9NHv6Dh5Zb39IHsine7YAw3kLoHS2z7HCUkIS1j3XaRenwBgn4pH6 2MPkl09gDstqAZR0Hb2BMC+FRtTzMO+DxgCK72bjnPNs2UDhMJvTCoNKv+0/+e+y UUphJp/kWG4fak= 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:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=yT2rieHvgv9HEP6a3IpW7JsG6xI=; b=yyg 3q2C4I8tS1AoT7LzWAv7IAdF5gbUGeOQKCUFn8H+3Uj70dVslqtfMQJvspzH7NWm EZMO9VttxQPyme4JXHRXn5X4DjjgZ1a7sNqWI+Vgy/Lqkbb0QFvJhDx/8V3MQn6/ VdlbcIdj3DyGYFmZDc7+7FYy+fqJT+fX5p22t9Cc= Received: (qmail 21486 invoked by alias); 18 Sep 2018 13:25:17 -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 20504 invoked by uid 89); 18 Sep 2018 13:25:05 -0000 Authentication-Results: sourceware.org; auth=none 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 autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Date: Tue, 18 Sep 2018 13:24:58 +0000 From: Joseph Myers To: Subject: Fix ldbl-128ibm ceill, floorl inlining of ceil, floor [committed] Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 The ldbl-128ibm implementations of ceill and floorl call the corresponding double functions. This patch fixes those implementations to call those functions as ceil and floor rather than as __ceil and __floor, so that the proper inlining takes place when possible, while including local asm redirections for when the functions are not inlined since NO_MATH_REDIRECT applies to the double functions as well as to the long double ones. Tested with build-many-glibcs.py for all its powerpc configurations. Committed. 2018-09-18 Joseph Myers * sysdeps/ieee754/ldbl-128ibm/s_ceill.c (ceil): Redirect to __ceil. (__ceill): Call ceil instead of __ceil. * sysdeps/ieee754/ldbl-128ibm/s_floorl.c (floor): Redirect to __floor. (__floorl): Call floor instead of __floor. diff --git a/sysdeps/ieee754/ldbl-128ibm/s_ceill.c b/sysdeps/ieee754/ldbl-128ibm/s_ceill.c index 800835411a..6ca13766be 100644 --- a/sysdeps/ieee754/ldbl-128ibm/s_ceill.c +++ b/sysdeps/ieee754/ldbl-128ibm/s_ceill.c @@ -24,6 +24,8 @@ #include #include +double ceil (double) asm ("__ceil"); + long double __ceill (long double x) @@ -37,7 +39,7 @@ __ceill (long double x) && __builtin_isless (__builtin_fabs (xh), __builtin_inf ()), 1)) { - hi = __ceil (xh); + hi = ceil (xh); if (hi != xh) { /* The high part is not an integer; the low part does not @@ -48,7 +50,7 @@ __ceill (long double x) else { /* The high part is a nonzero integer. */ - lo = __ceil (xl); + lo = ceil (xl); xh = hi; xl = lo; ldbl_canonicalize_int (&xh, &xl); diff --git a/sysdeps/ieee754/ldbl-128ibm/s_floorl.c b/sysdeps/ieee754/ldbl-128ibm/s_floorl.c index f33b6ad701..8767bac917 100644 --- a/sysdeps/ieee754/ldbl-128ibm/s_floorl.c +++ b/sysdeps/ieee754/ldbl-128ibm/s_floorl.c @@ -24,6 +24,8 @@ #include #include +double floor (double) asm ("__floor"); + long double __floorl (long double x) @@ -37,7 +39,7 @@ __floorl (long double x) && __builtin_isless (__builtin_fabs (xh), __builtin_inf ()), 1)) { - hi = __floor (xh); + hi = floor (xh); if (hi != xh) { /* The high part is not an integer; the low part does not @@ -48,7 +50,7 @@ __floorl (long double x) else { /* The high part is a nonzero integer. */ - lo = __floor (xl); + lo = floor (xl); xh = hi; xl = lo; ldbl_canonicalize_int (&xh, &xl);