From patchwork Thu Oct 26 19:06:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 117262 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp1125960qgn; Thu, 26 Oct 2017 12:09:33 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RG0J9n7bdnYLDC8wdmSg/YgAGXCFf/lVX6hKQIqxmApN+KqgsYLcHTRUEe4I5TH2O48Ury X-Received: by 10.98.64.75 with SMTP id n72mr6246157pfa.317.1509044973470; Thu, 26 Oct 2017 12:09:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509044973; cv=none; d=google.com; s=arc-20160816; b=VlvOcMwAgOV55BnFz4oT1YbZaEEcAhBnwAV8kVDtNaghIBb71/ilMLfXZVrK5+QyfY cUS+ng0HHUU8kNR3dod7qjEvDXq0If33pXpv0UUyD2fO/hp5bGhn93bSeOYoIyHhuxmg ZBTuYB9NQekcNgnYCCPpvNFjgfU/mz7Bf16l4dxWvC2jLtpDkUkRgo+yHDIYH4Vd0j0p CC6ePjL3hTxfmKGuqQrakEhEUjCVLf2QJ/xEgMoXCLmXm1HUoVdJBlxFI4HrQMn+K81R AU8GB0pt2wXCZORZ0GBPEFAxGaiClC8lCoS4dV4cOvSO4G4hWkynbdtpiGXzF6utoUug NB3g== 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:delivered-to :sender:list-help:list-post:list-archive:list-subscribe :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature:arc-authentication-results; bh=XqF+bMxLdYyyPbmXnI1mVMdF+/3RYQpJ6wpGKlq+xCc=; b=pnC8i8ewgCSW5qu6zu4I8jh/4CE8WZb97CgCPFMVcjDlPTCTrxk5kLX01j193xARTa omjmDaPEJGjPP+8IWIVW3PxNmsa61ls5W6k1tpmXlAX+uH8x9yUMEMsgoqh/Pl0DzGHc 0LTks0yzf9rWjdwYef94VBdZGmK5lpBThjTz0eBdfJpDUXyd6THjPwS+EKdsmFpSjVH4 kw/Ebqv+J281FGZSL8G7PO8AjDSGOcfI5qUllv85HfqnVMDVuxYDUQXstcrz3o0jdktN yVoiGmcJ6C3l54ebpSBYRg9HK3YPaeX9N5Z3oM89V6mXGcCMpdEQ+3i2V96mkIdr1zHr +TFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=AOkpgtdG; spf=pass (google.com: domain of libc-alpha-return-86412-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-86412-patch=linaro.org@sourceware.org; dmarc=fail (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 f5si3729453pgt.456.2017.10.26.12.09.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Oct 2017 12:09:33 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-86412-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=AOkpgtdG; spf=pass (google.com: domain of libc-alpha-return-86412-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-86412-patch=linaro.org@sourceware.org; dmarc=fail (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=moA37uVdf6wn28UshI8ZfHLrZA3nrX2 MM655B9wF8lzJAseDGlGQTSnGkmNd3WTn48xtc0eOphG01ZNdVXuFo4YF0tfd0S4 o7pUmopGAROnp0BkFguk9rJlLs6NSW3LdFgXpG/zQFm5XSDDkZHDRlPNG1LUhO7F l+q2s6G1AhkQ= 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=ixV1w0TTik+8r+vYTYNYrMDq1mc=; b=AOkpg tdGGotbe86bjxI24fXGeuGWsa+eIfNU5gzF75/rulYAXriZE09bKyB0ZLKFpIb59 I43jSVfHHoUiraDfbybDlysTysYADCvJoYnK1CDLWwzD8+9XkWWwuoP3dAtItZ/7 Gizyf/0qN48gEDU6M7SBpk11qIGcTWAqlrrt6k= Received: (qmail 98723 invoked by alias); 26 Oct 2017 19:07: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 98592 invoked by uid 89); 26 Oct 2017 19:07:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=H*RU:209.85.220.193, Hx-spam-relays-external:209.85.220.193 X-HELO: mail-qk0-f193.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=XqF+bMxLdYyyPbmXnI1mVMdF+/3RYQpJ6wpGKlq+xCc=; b=ie927jXBAxY3wXyiv5woHFMg9m/3y3nqXAq5Z7xdveJLqH9irxiFTzvVAJ1u+fzu9p GVj1p/lZFoBbTHefzS3UzYa5Z5r11sggPnbTOA+HbkPdovQop0T8XmiXPiA5oIFY3CZL w4yl1Zc+U+FshHfthW45wzj0SB/EAKcPVXTgJRceJo1erdZepZm11qzFCoUXo4WrWIyM UAPszucadxJA4PgfqsPuUW+1uDe0nNfgAvY6UIeqo7fLs9sSxBP/h6ZBJanRSHD9eC9m y12oyJ0JzKrNnPPdrScytIEWKbz5vobK7njMjgk1MEtuwQyhssqPINKamfbwENsKwEbN 4dlQ== X-Gm-Message-State: AMCzsaWJy3EeXT6ko7OyqCDzAJozcT+to3wzSwhg4I5Slrind7qBxZgJ LRBiRw+YKpp11tln0EEycelmqIJ9F9A= X-Received: by 10.55.24.73 with SMTP id j70mr8900742qkh.310.1509044831936; Thu, 26 Oct 2017 12:07:11 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 08/25] sparc: refactor sparc64 isinf{f} selector to C Date: Thu, 26 Oct 2017 17:06:36 -0200 Message-Id: <1509044813-9951-9-git-send-email-adhemerval.zanella@linaro.org> In-Reply-To: <1509044813-9951-1-git-send-email-adhemerval.zanella@linaro.org> References: <1509044813-9951-1-git-send-email-adhemerval.zanella@linaro.org> This patch refactors the sparc64 ifunc selector to a C implementation. Also, the generic symbol is moved to its own implementation file s_isinf{f}-generic.S). Checked on sparc64-linux-gnu and sparcv9-linux-gnu. * sysdeps/sparc/sparc64/fpu/multiarch/Makefile (sysdeps_calls): Add isinff-generic and s_isinf-generic objects. * sysdeps/sparc/sparc64/fpu/multiarch/s_isinf-generic.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_isinff-generic.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.S: Remove file. * sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.S: Likewise. Signed-off-by: Adhemerval Zanella --- ChangeLog | 9 ++++++ sysdeps/sparc/sparc64/fpu/multiarch/Makefile | 4 +-- .../sparc/sparc64/fpu/multiarch/s_isinf-generic.S | 6 ++++ sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.S | 15 --------- sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.c | 37 ++++++++++++++++++++++ .../sparc/sparc64/fpu/multiarch/s_isinff-generic.S | 6 ++++ sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.S | 15 --------- sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.c | 33 +++++++++++++++++++ 8 files changed, 93 insertions(+), 32 deletions(-) create mode 100644 sysdeps/sparc/sparc64/fpu/multiarch/s_isinf-generic.S delete mode 100644 sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.S create mode 100644 sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.c create mode 100644 sysdeps/sparc/sparc64/fpu/multiarch/s_isinff-generic.S delete mode 100644 sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.S create mode 100644 sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.c -- 2.7.4 diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/Makefile b/sysdeps/sparc/sparc64/fpu/multiarch/Makefile index a46773b..f0c8fa3 100644 --- a/sysdeps/sparc/sparc64/fpu/multiarch/Makefile +++ b/sysdeps/sparc/sparc64/fpu/multiarch/Makefile @@ -3,8 +3,8 @@ ifeq ($(subdir),math) # by printf. While the libc objects have the prefix s_, the libm ones are # prefixed with m_. sysdep_calls := s_signbitf-vis3 s_signbit-vis3 s_signbitf-generic \ - s_signbit-generic s_finitef-vis3 \ - s_finite-vis3 s_isinff-vis3 s_isinf-vis3 \ + s_signbit-generic s_finitef-vis3 s_finite-vis3 \ + s_isinff-vis3 s_isinf-vis3 s_isinff-generic s_isinf-generic \ s_isnanf-vis3 s_isnan-vis3 s_isnanf-generic s_isnan-generic sysdep_routines += $(sysdep_calls) diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_isinf-generic.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_isinf-generic.S new file mode 100644 index 0000000..ebaf054 --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_isinf-generic.S @@ -0,0 +1,6 @@ +#define __isinf __isinf_generic +#undef hidden_def +#define hidden_def(a) +#undef weak_alias +#define weak_alias(a,b) +#include <./sysdeps/sparc/sparc64/fpu/s_isinf.S> diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.S deleted file mode 100644 index ed9b626..0000000 --- a/sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.S +++ /dev/null @@ -1,15 +0,0 @@ -#include - -SPARC_ASM_VIS3_IFUNC(isinf) - -hidden_def (__isinf) -weak_alias (__isinf, isinf) - -# undef weak_alias -# define weak_alias(a, b) -# undef hidden_def -# define hidden_def(a) - -#define __isinf __isinf_generic - -#include "../s_isinf.S" diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.c new file mode 100644 index 0000000..d7fec22 --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.c @@ -0,0 +1,37 @@ +/* isinf ifunc resolver, Linux/sparc64 version. + Copyright (C) 2017 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 + . */ + +#define __isinf __redirect___isinf +#define __isinff __redirect___isinff +#define __isinfl __redirect___isinfl +#include +#undef __isinf +#undef __isinff +#undef __isinfl +#include + +extern __typeof (isinf) __isinf_vis3 attribute_hidden; +extern __typeof (isinf) __isinf_generic attribute_hidden; + +sparc_libm_ifunc_redirected (__redirect___isinf, __isinf, + hwcap & HWCAP_SPARC_VIS3 + ? __isinf_vis3 + : __isinf_generic) + +sparc_ifunc_redirected_hidden_def (__redirect___isinf, __isinf) +weak_alias (__isinf, isinf) diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_isinff-generic.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_isinff-generic.S new file mode 100644 index 0000000..d37243f --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_isinff-generic.S @@ -0,0 +1,6 @@ +#define __isinff __isinff_generic +#undef hidden_def +#define hidden_def(a) +#undef weak_alias +#define weak_alias(a,b) +#include diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.S deleted file mode 100644 index 0451739..0000000 --- a/sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.S +++ /dev/null @@ -1,15 +0,0 @@ -#include - -SPARC_ASM_VIS3_IFUNC(isinff) - -hidden_def (__isinff) -weak_alias (__isinff, isinff) - -# undef weak_alias -# define weak_alias(a, b) -# undef hidden_def -# define hidden_def(a) - -#define __isinff __isinff_generic - -#include "../s_isinff.S" diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.c new file mode 100644 index 0000000..31c67f3 --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.c @@ -0,0 +1,33 @@ +/* isinff ifunc resolver, Linux/sparc64 version. + Copyright (C) 2017 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 + . */ + +#define __isinff __redirect___isinff +#include +#undef __isinff +#include + +extern __typeof (isinff) __isinff_vis3 attribute_hidden; +extern __typeof (isinff) __isinff_generic attribute_hidden; + +sparc_libm_ifunc_redirected (__redirect___isinff, __isinff, + hwcap & HWCAP_SPARC_VIS3 + ? __isinff_vis3 + : __isinff_generic); + +sparc_ifunc_redirected_hidden_def (__redirect___isinff, __isinff) +weak_alias (__isinff, isinff)