From patchwork Fri Mar 29 13:35:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 161441 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp2053218jan; Fri, 29 Mar 2019 06:39:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqw7RVn5oVVPL6/UCfEbnR9rRXTRfWQOOosRhB2itj2whRveFHRpp8bQQeSI7Lnd+aLbrsww X-Received: by 2002:a17:902:20eb:: with SMTP id v40mr48870764plg.20.1553866795922; Fri, 29 Mar 2019 06:39:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553866795; cv=none; d=google.com; s=arc-20160816; b=LCKrGZcEPNNtyW2XCkr6unR01wC5URHelg9UisRYe8i5q7ku7UrbzfXBvDFUWV8Zm2 YPNsZbBDRwuZ9bX+nBVpoYljWLf6tduTwHvFXC8K0/wahXIYN+6jhq9S+UFLYPlBMsRX pOaESFBBNOS2dBABp3e8DyVAH+G+Yy+Qw1Ee3CDR6ikLi5ZKtXlg25/0Gc6VE5GshuI5 WkCJa4CRUyte5FuNaE+hSu3WzEMFbrZ810HXlPMAR8u+jieO6iTGUSTd4m+IekVHHkIo 92vWWkCMdcBu0F2xm2/+ev9tG9A/WYF4LBBHXyFJwhLsYroFzbamI+5EGBg7jVPcrdVc 68ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to:sender:list-help:list-post:list-archive :list-subscribe:list-unsubscribe:list-id:precedence:mailing-list :dkim-signature:domainkey-signature; bh=ikw/7vsk/35JMvyCVZ+eW/P8Joj4OExcy9oJo4tde9Y=; b=YQJAvlHpiFX+rwXttd1EzFjzp+WTADRfEExd1TwoNeL00BKgq3DNG+G7cQh2kb1thM wfe7x+98k10NdFBB2hpPYUgA4S4yrXfWh/Khpv1lxjV1pcsOpPWSYvCFNuhF0viaGKdD YkoXAzgyBtLR1jSuvuZMSa57YVBcsWwWtI0z0Fh5lyW+ZNYGrdkpVg7Lq3ALJtiU/dA/ A+4qjoZa2tQxjxQyE5lyscTuLsDvQoMKWg7Y1LxFLv0zfH6QrFgjZj2i92b+eWfNdVIV o5T2Hq1r8Homv4AZZhK/2Ug1G5f7FoPex++nzPQZzewzkojAu5Q9guwv5pc8a07NDKui z60g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="yYwF/mHW"; dkim=pass header.i=@linaro.org header.s=google header.b=KQiseuD5; spf=pass (google.com: domain of libc-alpha-return-101010-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-101010-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id w7si1912278pll.397.2019.03.29.06.39.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Mar 2019 06:39:55 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-101010-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="yYwF/mHW"; dkim=pass header.i=@linaro.org header.s=google header.b=KQiseuD5; spf=pass (google.com: domain of libc-alpha-return-101010-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-101010-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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:message-id:in-reply-to :references; q=dns; s=default; b=d3/FZ/elDLkZcfVd8CA78uO2cW3B0QP 5vz2bVfE3koFypHlJ0qkhu0bEjSUm7/awXoy/5yInLrUsHL937RnystLdGWz8ot3 i/oV/udxStsWPy0yLYE8/lqTEGa3nOUeuvE/yb68zVUKBXb8dSZnoVHqM24kz9jW r82WzlTNG2TI= 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:message-id:in-reply-to :references; s=default; bh=Mig3TBrARxXwa2Gc9c1CudC8i18=; b=yYwF/ mHWd7brDcamA3JImHpqNxP3lK85Ef9TUKzp9jCeYOaFcfePVN/lh9EGPOvgZ1vEr bS3aKMhkDjw6LGaoBtD0AHk4uY5AaoYHLwP844DZeMxeorcuX8QofZwNzfQHtVTc eukpYOGcI/LOqigKw/0M/EkbcVufgvbgrfwA2I= Received: (qmail 122093 invoked by alias); 29 Mar 2019 13:36:22 -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 120715 invoked by uid 89); 29 Mar 2019 13:36:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-vs1-f67.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=ikw/7vsk/35JMvyCVZ+eW/P8Joj4OExcy9oJo4tde9Y=; b=KQiseuD5Fudpeld3u5ywwqZ3kul+q61rwESpIAU3/QJIs/ys60sFym8lgxm2P9lUvW 2EzI34Pc3sYv3o4HfyZeaKMZx2WQpvghMCdGuRdtXHclaGDq8kYAHomlmdiuaVbtmLJH vZBH7uT85eN/pQTI0yEreFkpup3/A72MqTsXv9cvaBwWyyuAfvf/45I1WCwYd48uhPuH ZeZFb7985XsdxrFc28IAKgjooRs/1fmIW+/uYUSvYT2plIc4zFqaxLaHmLvM0UZgtoaK TP136isF9EaT0Njt6A4Mham4iqrt0zvsP5zLWeFq7k/YDlx4Z0KU+tYeyz3I98xyoPNJ XUag== Return-Path: From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 19/28] powerpc: Refactor powerpc32 lrint/lrintf/llrint/llrintf Date: Fri, 29 Mar 2019 10:35:20 -0300 Message-Id: <20190329133529.22523-20-adhemerval.zanella@linaro.org> In-Reply-To: <20190329133529.22523-1-adhemerval.zanella@linaro.org> References: <20190329133529.22523-1-adhemerval.zanella@linaro.org> This patches consolidates all the powerpc llrint{f} implementations on the generic sysdeps/powerpc/powerpc32/fpu/s_llrint{f}. The only missing optimization is the power6x one which I could not make GCC generates mftgpr for 32 bits output. Checked on powerpc-linux-gnu (built without --with-cpu, with --with-cpu=power4 and with --with-cpu=power5+ and --disable-multi-arch), powerpc64-linux-gnu (built without --with-cp and with --with-cpu=power5+ and --disable-multi-arch). * sysdeps/powerpc/fpu/s_lrintf.S: Remove file. * sysdeps/powerpc/powerpc64/fpu/s_lrintf.c: Move to ... * sysdeps/powerpc/fpu/s_lrintf.c: ... here. * sysdeps/powerpc/powerpc32/fpu/Makefile [$(subdir) == math] (CFLAGS-s_lrint.c): New rule. * sysdeps/powerpc/powerpc32/fpu/s_llrint.c (__llrint): Add power4 optimization. * sysdeps/powerpc/powerpc32/fpu/s_llrintf.c (__llrintf): Likewise. * sysdeps/powerpc/powerpc32/fpu/s_lrint.S: Remove file. * sysdeps/powerpc/powerpc32/fpu/s_lrint.c: New file. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile (CFLAGS-s_llrintf-power6.c, CFLAGS-s_llrintf-ppc32.c, CFLAGS-s_llrint-power6.c, CFLAGS-s_llrint-ppc32.c, CFLAGS-s_lrint-ppc32.c): New rule. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.S: Remove file. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.S: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.S: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.S: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.S: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S: Likewise. * sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S: Likewise. * sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.c: New file. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.c: Likewise. --- sysdeps/powerpc/fpu/s_lrintf.S | 1 - .../powerpc/{powerpc64 => }/fpu/s_lrintf.c | 0 sysdeps/powerpc/powerpc32/fpu/Makefile | 6 +++ sysdeps/powerpc/powerpc32/fpu/s_llrint.c | 9 +++++ sysdeps/powerpc/powerpc32/fpu/s_llrintf.c | 7 ++++ sysdeps/powerpc/powerpc32/fpu/s_lrint.S | 40 ------------------- sysdeps/powerpc/powerpc32/fpu/s_lrint.c | 40 +++++++++++++++++++ .../powerpc32/power4/fpu/multiarch/Makefile | 5 +++ .../power4/fpu/multiarch/s_llrint-power6.S | 31 -------------- .../power4/fpu/multiarch/s_llrint-power6.c | 2 + .../power4/fpu/multiarch/s_llrint-ppc32.S | 31 -------------- .../power4/fpu/multiarch/s_llrint-ppc32.c | 2 + .../power4/fpu/multiarch/s_llrintf-power6.S | 26 ------------ .../power4/fpu/multiarch/s_llrintf-power6.c | 2 + .../power4/fpu/multiarch/s_llrintf-ppc32.S | 26 ------------ .../power4/fpu/multiarch/s_llrintf-ppc32.c | 2 + .../power4/fpu/multiarch/s_lrint-ppc32.S | 31 -------------- .../power4/fpu/multiarch/s_lrint-ppc32.c | 2 + .../powerpc/powerpc32/power4/fpu/s_llrint.S | 39 ------------------ .../powerpc/powerpc32/power4/fpu/s_llrintf.S | 39 ------------------ .../powerpc/powerpc32/power6/fpu/s_llrint.S | 39 ------------------ .../powerpc/powerpc32/power6/fpu/s_llrintf.S | 39 ------------------ 22 files changed, 77 insertions(+), 342 deletions(-) delete mode 100644 sysdeps/powerpc/fpu/s_lrintf.S rename sysdeps/powerpc/{powerpc64 => }/fpu/s_lrintf.c (100%) delete mode 100644 sysdeps/powerpc/powerpc32/fpu/s_lrint.S create mode 100644 sysdeps/powerpc/powerpc32/fpu/s_lrint.c delete mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.S create mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.c delete mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.S create mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.c delete mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.S create mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.c delete mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.S create mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.c delete mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.S create mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.c delete mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S delete mode 100644 sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S delete mode 100644 sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S delete mode 100644 sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S -- 2.17.1 Reviewed-by: Gabriel F. T. Gomes diff --git a/sysdeps/powerpc/fpu/s_lrintf.S b/sysdeps/powerpc/fpu/s_lrintf.S deleted file mode 100644 index e24766535f..0000000000 --- a/sysdeps/powerpc/fpu/s_lrintf.S +++ /dev/null @@ -1 +0,0 @@ -/* __lrintf is in s_lrint.c */ diff --git a/sysdeps/powerpc/powerpc64/fpu/s_lrintf.c b/sysdeps/powerpc/fpu/s_lrintf.c similarity index 100% rename from sysdeps/powerpc/powerpc64/fpu/s_lrintf.c rename to sysdeps/powerpc/fpu/s_lrintf.c diff --git a/sysdeps/powerpc/powerpc32/fpu/Makefile b/sysdeps/powerpc/powerpc32/fpu/Makefile index e05073970d..c79b192f60 100644 --- a/sysdeps/powerpc/powerpc32/fpu/Makefile +++ b/sysdeps/powerpc/powerpc32/fpu/Makefile @@ -1,3 +1,9 @@ +ifeq ($(subdir),math) +# lrint is aliased to lrintf, so suppress compiler builtins to +# avoid mismatched signatures. +CFLAGS-s_lrint.c += -fno-builtin-lrintf +endif + ifeq ($(subdir),misc) sysdep_routines += fprsave fprrest endif diff --git a/sysdeps/powerpc/powerpc32/fpu/s_llrint.c b/sysdeps/powerpc/powerpc32/fpu/s_llrint.c index 7e91d606c2..42558efd46 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_llrint.c +++ b/sysdeps/powerpc/powerpc32/fpu/s_llrint.c @@ -26,6 +26,12 @@ long long int __llrint (double x) { +#ifdef _ARCH_PWR4 + /* Assume powerpc64 instructions availability. */ + long long int ret; + __asm__ ("fctid %0, %1" : "=d" (ret) : "d" (x)); + return ret; +#else double rx = rint (x); if (HAVE_PPC_FCTIDZ || rx != x) return (long long int) rx; @@ -53,5 +59,8 @@ __llrint (double x) else return (long long int) (long int) rx << 32; } +#endif } +#ifndef __llrint libm_alias_double (__llrint, llrint) +#endif diff --git a/sysdeps/powerpc/powerpc32/fpu/s_llrintf.c b/sysdeps/powerpc/powerpc32/fpu/s_llrintf.c index 021a86fada..b75655e2c1 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_llrintf.c +++ b/sysdeps/powerpc/powerpc32/fpu/s_llrintf.c @@ -24,6 +24,12 @@ long long int __llrintf (float x) { +#ifdef _ARCH_PWR4 + /* Assume powerpc64 instructions availability. */ + long long int ret; + __asm__ ("fctid %0, %1" : "=d" (ret) : "d" (x)); + return ret; +#else float rx = rintf (x); if (HAVE_PPC_FCTIDZ || rx != x) return (long long int) rx; @@ -43,5 +49,6 @@ __llrintf (float x) mant <<= exponent - 23; return (long long int) ((i0 & 0x80000000) != 0 ? -mant : mant); } +#endif } libm_alias_float (__llrint, llrint) diff --git a/sysdeps/powerpc/powerpc32/fpu/s_lrint.S b/sysdeps/powerpc/powerpc32/fpu/s_lrint.S deleted file mode 100644 index fdad180116..0000000000 --- a/sysdeps/powerpc/powerpc32/fpu/s_lrint.S +++ /dev/null @@ -1,40 +0,0 @@ -/* Round double to long int. PowerPC32 version. - Copyright (C) 2004-2019 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include -#include - -/* long int[r3] __lrint (double x[fp1]) */ -ENTRY (__lrint) - stwu r1,-16(r1) - fctiw fp13,fp1 - stfd fp13,8(r1) - nop /* Ensure the following load is in a different dispatch group */ - nop /* to avoid pipe stall on POWER4&5. */ - nop - lwz r3,8+LOWORD(r1) - addi r1,r1,16 - blr - END (__lrint) - -libm_alias_double (__lrint, lrint) - -strong_alias (__lrint, __lrintf) -libm_alias_float (__lrint, lrint) diff --git a/sysdeps/powerpc/powerpc32/fpu/s_lrint.c b/sysdeps/powerpc/powerpc32/fpu/s_lrint.c new file mode 100644 index 0000000000..21bdc5c063 --- /dev/null +++ b/sysdeps/powerpc/powerpc32/fpu/s_lrint.c @@ -0,0 +1,40 @@ +/* Round to nearest integer. PowerPC32 version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, see . */ + +#define NO_MATH_REDIRECT +#define lrintf __redirect_lrintf +#define __lrintf __redirect___lrintf +#include +#undef lrintf +#undef __lrintf +#include +#include +#include + +long int +__lrint (double x) +{ + long long int ret; + __asm__ ("fctiw %0, %1" : "=d" (ret) : "d" (x)); + return ret; +} +#ifndef __lrint +libm_alias_double (__lrint, lrint) +strong_alias (__lrint, __lrintf) +libm_alias_float (__lrint, lrint) +#endif diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile index 51b13fe33a..d33d403a1b 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile @@ -18,6 +18,11 @@ libm-sysdep_routines += s_llrintf-power6 s_llrintf-ppc32 s_llrint-power6 \ s_logbf-power7 s_logbf-ppc32 e_hypot-power7 \ e_hypot-ppc32 e_hypotf-power7 e_hypotf-ppc32 +CFLAGS-s_llrintf-power6.c += -mcpu=power6 +CFLAGS-s_llrintf-ppc32.c += -mcpu=power4 +CFLAGS-s_llrint-power6.c += -mcpu=power6 +CFLAGS-s_llrint-ppc32.c += -mcpu=power4 +CFLAGS-s_lrint-ppc32.c += -mcpu=power4 CFLAGS-s_ceil-power5+.c = -mcpu=power5+ CFLAGS-s_ceilf-power5+.c = -mcpu=power5+ CFLAGS-s_modf-power5+.c = -mcpu=power5+ diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.S deleted file mode 100644 index 253a12bf72..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.S +++ /dev/null @@ -1,31 +0,0 @@ -/* Round double to long int. PowerPC32/Power6. - Copyright (C) 2013-2019 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - -#undef weak_alias -#define weak_alias(a,b) -#undef strong_alias -#define strong_alias(a,b) -#undef compat_symbol -#define compat_symbol(a,b,c,d) - -#define __llrint __llrint_power6 - -#include diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.c new file mode 100644 index 0000000000..328e11844f --- /dev/null +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.c @@ -0,0 +1,2 @@ +#define __llrint __llrint_power6 +#include diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.S deleted file mode 100644 index e7bf6760c1..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.S +++ /dev/null @@ -1,31 +0,0 @@ -/* llrint function. PowerPC32 default version. - Copyright (C) 2013-2019 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - -#undef weak_alias -#define weak_alias(a,b) -#undef strong_alias -#define strong_alias(a,b) -#undef compat_symbol -#define compat_symbol(a,b,c,d) - -#define __llrint __llrint_ppc32 - -#include diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.c new file mode 100644 index 0000000000..8f192ab990 --- /dev/null +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.c @@ -0,0 +1,2 @@ +#define __llrint __llrint_ppc32 +#include diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.S deleted file mode 100644 index c6b7769457..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.S +++ /dev/null @@ -1,26 +0,0 @@ -/* Round float to long int. PowerPC32/POWER6 version. - Copyright (C) 2013-2019 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include - -#undef weak_alias -#define weak_alias(a,b) - -#define __llrintf __llrintf_power6 - -#include diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.c new file mode 100644 index 0000000000..5b1a5a8cf0 --- /dev/null +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.c @@ -0,0 +1,2 @@ +#define __llrintf __llrintf_power6 +#include diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.S deleted file mode 100644 index c592b31aff..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.S +++ /dev/null @@ -1,26 +0,0 @@ -/* llrintf function. PowerPC32 default version. - Copyright (C) 2013-2019 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include - -#undef weak_alias -#define weak_alias(a,b) - -#define __llrintf __llrintf_ppc32 - -#include diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.c new file mode 100644 index 0000000000..061962b84d --- /dev/null +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.c @@ -0,0 +1,2 @@ +#define __llrintf __llrintf_ppc32 +#include diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.S deleted file mode 100644 index 617a9a7b8d..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.S +++ /dev/null @@ -1,31 +0,0 @@ -/* Round double to long int. PowerPC32 default version. - Copyright (C) 2013-2019 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - -#undef weak_alias -#define weak_alias(a,b) -#undef strong_alias -#define strong_alias(a,b) -#undef compat_symbol -#define compat_symbol(a,b,c,d) - -#define __lrint __lrint_ppc32 - -#include diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.c new file mode 100644 index 0000000000..ce2764b61b --- /dev/null +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.c @@ -0,0 +1,2 @@ +#define __lrint __lrint_ppc32 +#include diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S b/sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S deleted file mode 100644 index 3fdb5c3fe3..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S +++ /dev/null @@ -1,39 +0,0 @@ -/* Round double to long int. PowerPC32 on PowerPC64 version. - Copyright (C) 2004-2019 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - -/* long long int[r3, r4] __llrint (double x[fp1]) */ -ENTRY (__llrint) - CALL_MCOUNT - stwu r1,-16(r1) - cfi_adjust_cfa_offset (16) - fctid fp13,fp1 - stfd fp13,8(r1) - nop /* Insure the following load is in a different dispatch group */ - nop /* to avoid pipe stall on POWER4&5. */ - nop - lwz r3,8+HIWORD(r1) - lwz r4,8+LOWORD(r1) - addi r1,r1,16 - blr - END (__llrint) - -libm_alias_double (__llrint, llrint) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S b/sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S deleted file mode 100644 index 3a6364241e..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S +++ /dev/null @@ -1,39 +0,0 @@ -/* Round float to long int. PowerPC32 on PowerPC64 version. - Copyright (C) 2004-2019 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - -/* long long int[r3, r4] __llrintf (float x[fp1]) */ -ENTRY (__llrintf) - CALL_MCOUNT - stwu r1,-16(r1) - cfi_adjust_cfa_offset (16) - fctid fp13,fp1 - stfd fp13,8(r1) - nop /* Insure the following load is in a different dispatch group */ - nop /* to avoid pipe stall on POWER4&5. */ - nop - lwz r3,8+HIWORD(r1) - lwz r4,8+LOWORD(r1) - addi r1,r1,16 - blr - END (__llrintf) - -libm_alias_float (__llrint, llrint) - diff --git a/sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S b/sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S deleted file mode 100644 index e8134f7451..0000000000 --- a/sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S +++ /dev/null @@ -1,39 +0,0 @@ -/* Round double to long int. PowerPC32 on PowerPC64 version. - Copyright (C) 2004-2019 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - -/* long long int[r3, r4] __llrint (double x[fp1]) */ -ENTRY (__llrint) - CALL_MCOUNT - stwu r1,-16(r1) - cfi_adjust_cfa_offset (16) - fctid fp13,fp1 - stfd fp13,8(r1) -/* Insure the following load is in a different dispatch group by - inserting "group ending nop". */ - ori r1,r1,0 - lwz r3,8+HIWORD(r1) - lwz r4,8+LOWORD(r1) - addi r1,r1,16 - blr - END (__llrint) - -libm_alias_double (__llrint, llrint) diff --git a/sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S b/sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S deleted file mode 100644 index b4d013f7a3..0000000000 --- a/sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S +++ /dev/null @@ -1,39 +0,0 @@ -/* Round float to long int. PowerPC32 on PowerPC64 version. - Copyright (C) 2004-2019 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - -/* long long int[r3, r4] __llrintf (float x[fp1]) */ -ENTRY (__llrintf) - CALL_MCOUNT - stwu r1,-16(r1) - cfi_adjust_cfa_offset (16) - fctid fp13,fp1 - stfd fp13,8(r1) -/* Insure the following load is in a different dispatch group by - inserting "group ending nop". */ - ori r1,r1,0 - lwz r3,8+HIWORD(r1) - lwz r4,8+LOWORD(r1) - addi r1,r1,16 - blr - END (__llrintf) - -libm_alias_float (__llrint, llrint) -