From patchwork Thu Apr 7 15:07:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 52706 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 295B7384387A for ; Thu, 7 Apr 2022 15:07:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 295B7384387A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1649344079; bh=ciHF+kCa8GXQqoOXBrvcOnH8mLsAoxjXow9lwibM5qs=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=VWGuyySQWdDwfgygFZ76L/9aZWRYzJL4xANSDmnGgi6at1PhhQJDYaaj7mnscPjqg ni0vZ/NcDb9/aqppjrGMyTZW6cU461FDXk1komDK4CHaAqGTvE7kEnYp/lxXOOgB+p 1sn1kzR/iqRtcL4ORj1MejV1u+M6kX2QBmQdpiDE= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) by sourceware.org (Postfix) with ESMTPS id 9A5A13857809 for ; Thu, 7 Apr 2022 15:07:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9A5A13857809 Received: by mail-ot1-x32c.google.com with SMTP id z9-20020a05683020c900b005b22bf41872so4053021otq.13 for ; Thu, 07 Apr 2022 08:07:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=ciHF+kCa8GXQqoOXBrvcOnH8mLsAoxjXow9lwibM5qs=; b=x3ia/0Sf50CYl/aWBOczRHEU4O79IGDB1k67+Y2UDI1yKkmOyyI3v3xBsmQbxGs7l0 VUSfy3W8M8s1IDg7ehJ1gZj9D5Bqu/KPaWjiFswjK7OpFkdcNXbjnCBVVUc8y/p56rJc CE27bMcOZdk2hZgP52dC1iDJwQnvPJ83hleRfPQykB3aJzvN0pKxrQ37FIUWy28ELD4a NN5S0EjhVpkLX5asktDRF60u18MbXgQZOnZKz11Ul0jS894HyWdiufMfSmTlEigNI1In pjx3Gym2q+6PKN9n9fqkgnHfddOixNrUhyKOubIIaBnAGBr77DgUi3dWV61+vKNzeDZh g71w== X-Gm-Message-State: AOAM532JnEWBSRbRHAbm/GoZBzhYAHiYW+R/Jw7BMW08i0TuqnJTy0Ac Qspgz5HYPa8QyF99c9e6iHhetjuPEzluQw== X-Google-Smtp-Source: ABdhPJyQ6tvWfphzmjdrhdJk3neRnMZbBRhOSWLyAydT44bkblcxw7ad4/GPQTnkA5j3cuLvktBrPg== X-Received: by 2002:a9d:1e3:0:b0:5cb:425d:fd24 with SMTP id e90-20020a9d01e3000000b005cb425dfd24mr5067078ote.50.1649344056367; Thu, 07 Apr 2022 08:07:36 -0700 (PDT) Received: from birita.. ([2804:431:c7cb:321:9304:77a6:d900:ebb]) by smtp.gmail.com with ESMTPSA id bp21-20020a056820199500b003298e6877c7sm1465555oob.29.2022.04.07.08.07.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 08:07:35 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [COMMITTED] powerpc: Remove fcopysign{f} implementation Date: Thu, 7 Apr 2022 12:07:32 -0300 Message-Id: <20220407150732.564042-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" The builtin and generic implementation from generic files are suffice. Checked on powerpc64-linux-gnu and powerpc-linux-gnu. --- sysdeps/powerpc/fpu/s_copysign.c | 32 ---------- sysdeps/powerpc/fpu/s_copysignf.c | 28 --------- sysdeps/powerpc/powerpc32/fpu/s_copysignl.S | 66 --------------------- sysdeps/powerpc/powerpc64/fpu/s_copysignl.S | 48 --------------- 4 files changed, 174 deletions(-) delete mode 100644 sysdeps/powerpc/fpu/s_copysign.c delete mode 100644 sysdeps/powerpc/fpu/s_copysignf.c delete mode 100644 sysdeps/powerpc/powerpc32/fpu/s_copysignl.S delete mode 100644 sysdeps/powerpc/powerpc64/fpu/s_copysignl.S diff --git a/sysdeps/powerpc/fpu/s_copysign.c b/sysdeps/powerpc/fpu/s_copysign.c deleted file mode 100644 index bc6bbd04f1..0000000000 --- a/sysdeps/powerpc/fpu/s_copysign.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copy sign of a number. PowerPC version. - Copyright (C) 2019-2022 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 -#include -#include -#include - -double -__copysign (double x, double y) -{ - return __builtin_copysign (x, y); -} -libm_alias_double (__copysign, copysign) -#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0) -compat_symbol (libc, __copysign, copysignl, GLIBC_2_0); -#endif diff --git a/sysdeps/powerpc/fpu/s_copysignf.c b/sysdeps/powerpc/fpu/s_copysignf.c deleted file mode 100644 index a506176339..0000000000 --- a/sysdeps/powerpc/fpu/s_copysignf.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copy sign of a number. PowerPC version. - Copyright (C) 2019-2022 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 -#include -#include - -float -__copysignf (float x, float y) -{ - return __builtin_copysignf (x, y); -} -libm_alias_float (__copysign, copysign) diff --git a/sysdeps/powerpc/powerpc32/fpu/s_copysignl.S b/sysdeps/powerpc/powerpc32/fpu/s_copysignl.S deleted file mode 100644 index e31425d0f4..0000000000 --- a/sysdeps/powerpc/powerpc32/fpu/s_copysignl.S +++ /dev/null @@ -1,66 +0,0 @@ -/* Copy a sign bit between floating-point values. - IBM extended format long double version. - Copyright (C) 2006-2022 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 - -ENTRY(__copysignl) -/* long double [f1,f2] copysign (long double [f1,f2] x, long double [f3,f4] y); - copysign(x,y) returns a value with the magnitude of x and - with the sign bit of y. */ -#ifdef _ARCH_PPCGR - /* fsel available. */ - stwu r1,-16(r1) - cfi_adjust_cfa_offset (16) - stfd fp3,8(r1) - fmr fp0,fp1 - fabs fp1,fp1 - lwz r3,8+HIWORD(r1) - cmpwi cr6,r3,0 - addi r1,r1,16 - cfi_adjust_cfa_offset (-16) - fneg fp3,fp2 - fsel fp2,fp0,fp2,fp3 - bgelr cr6 - fneg fp1,fp1 - fneg fp2,fp2 - blr -#else - stwu r1,-32(r1) - cfi_adjust_cfa_offset (32) - stfd fp3,8(r1) - stfd fp1,16(r1) - lwz r3,8+HIWORD(r1) - lwz r4,16+HIWORD(r1) - xor r3,r3,r4 - cmpwi cr6,r3,0 - addi r1,r1,32 - cfi_adjust_cfa_offset (-32) - bgelr cr6 - fneg fp1,fp1 - fneg fp2,fp2 - blr -#endif -END (__copysignl) - -#if IS_IN (libm) -long_double_symbol (libm, __copysignl, copysignl) -#else -long_double_symbol (libc, __copysignl, copysignl) -#endif diff --git a/sysdeps/powerpc/powerpc64/fpu/s_copysignl.S b/sysdeps/powerpc/powerpc64/fpu/s_copysignl.S deleted file mode 100644 index 4146f6079e..0000000000 --- a/sysdeps/powerpc/powerpc64/fpu/s_copysignl.S +++ /dev/null @@ -1,48 +0,0 @@ -/* Copy a sign bit between floating-point values. - IBM extended format long double version. - Copyright (C) 2004-2022 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 - -ENTRY_TOCLESS (__copysignl) -/* long double [f1,f2] copysign (long double [f1,f2] x, long double [f3,f4] y); - copysign(x,y) returns a value with the magnitude of x and - with the sign bit of y. */ - stfd fp3,-16(r1) - ld r3,-16(r1) - cmpdi r3,0 - blt L(0) - fmr fp0,fp1 - fabs fp1,fp1 - fneg fp3,fp2 - fsel fp2,fp0,fp2,fp3 - blr -L(0): - fmr fp0,fp1 - fnabs fp1,fp1 - fneg fp3,fp2 - fsel fp2,fp0,fp3,fp2 - blr -END (__copysignl) - -#if IS_IN (libm) -long_double_symbol (libm, __copysignl, copysignl) -#else -long_double_symbol (libc, __copysignl, copysignl) -#endif