From patchwork Thu Oct 26 19:06:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 117258 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp1125139qgn; Thu, 26 Oct 2017 12:08:47 -0700 (PDT) X-Google-Smtp-Source: ABhQp+Rel5+OS3/gt77YLWFf/5KaANMB6RsB18Jl0dfhwYx4hUA2i3QjNSHaHRk5uSHERzjWKcs0 X-Received: by 10.84.128.99 with SMTP id 90mr5081673pla.171.1509044926941; Thu, 26 Oct 2017 12:08:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509044926; cv=none; d=google.com; s=arc-20160816; b=PfU4P2ocbdL6CvXXny9FJFibnHrDltaeTLTiI++aJprV5KgaKOAff21MRuC3f1HzrW 3eT/LfdLcQCJNBzE0ZVtDUa7uhyREovCf3CtZvI+5ifW/b5Aqwu1KLlo8TPym8C4g9fU iCUNahIk+D1LQC5HnUIP5+nvCxZaa1/eDQlOBtmtG2UeCiR+VqbKEkSpphWNjmROkcX+ Ufr4BwE0c55+RmOPgZr/fGG4RCbu8Jtr5WSwlNcNb1EjfDOgKQjnPk8LWVfWyry3DPAI 3tWSELUM0FfEofMrWwzk68ZdtIh13sA3eR8NYONXslzqXzz1TvLWFVUkawONj3MToEiU XLJQ== 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=/Ju9POmY8fFt2PjGjMd1q475JkxsM3IWARDMAc90akc=; b=H6thhQosZAoD4N/kQQvYqlJOQlAndHp7onDzA2kLe+AqxOtpPit2a9OMEtiq5q3p7H BzMPzNMl95XvTLARg7+AJwFu0hKfkUm3Zow9XhSAWjm6RrTDO+OM3UjmphLQaj9eSQTM 4FyDiKoHrAcrupRhGJF/fMq3UTlNzEMNiPkkR/uToreOOEnQbQx/Z8932E+0jwGKE0W/ e+g42LdZhI7r4z/nxZgXQpwa+57bxcChqWkj79tvb+YVtyf2APE5vmpixKNRWEFhqV/a lybSSthDk6RpdJuNIF1k4EWs5jNFnhHeuuTDOZ1RffFBP1lq4Azt02W6nKV1Dkq1aGfi 6hrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=iMZDk7xK; spf=pass (google.com: domain of libc-alpha-return-86408-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-86408-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 a9si3709456pgd.826.2017.10.26.12.08.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Oct 2017 12:08:46 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-86408-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=iMZDk7xK; spf=pass (google.com: domain of libc-alpha-return-86408-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-86408-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=HyXCl2IUiMpa5jOnZPfvVr0nLI7Y6Gj y+plIr3YSP6RbZdXTWaVVMcPFqi1QDnfoOfegIoS2b3kK5B52VxW4JpY+vhowJTn EbvbJ76s6VLDkKArkvyWHcPXoQ/a73J60hFgiqDz9G0E3786TYBq2Y6the+MzYhb zETkpO7+RCrI= 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=AxkS/X4cbeTcNYtM2prO+ukjOk8=; b=iMZDk 7xKx0T7QGbgIPLR9p0gdurQ4A9Ldqw2uMDr+12sWXlChUiWJAkUBm06kgiWrw0UE RAAUfj2Byg4U0FytV5qIRhtU8s4M4WHqxb9j6Ag1mKeYrvGqdeLpQdS4WvhJx0Jc IpkRBK/kBXKEZpUFrbU81c5jKh1xiDdzHWBZwY= Received: (qmail 97956 invoked by alias); 26 Oct 2017 19:07:15 -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 97909 invoked by uid 89); 26 Oct 2017 19:07:15 -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= 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=/Ju9POmY8fFt2PjGjMd1q475JkxsM3IWARDMAc90akc=; b=U4yHipgKx6EjNMinMeXDFC/FpqWsmt1vZCDJJb9js2kSsQxHCogsF5a2o2w2MA/CYo LmuoQnzoOEWecmaP4OHauQj8mEIwFNs91UqTxVQgCG/Dpd1/j0NSqokHqzVrbj6icPXL MTcZLDOhuCaFN5akU4rPLm8P5wQmgjAND3IVNYYWtYVGWlnF9d//ekuOwXurf9tDN8Mg j3h+rd6/dqCkTrs75Vm0u1/HKY3KFzuEDdT+qe0FEhquoN6XtEUOl5YzoWLp0pNYRBeo mrqQUkyI7Jl1CIYDdrlHg2XBXQdT4JyHySccdZm6SM9cXNq5LkJ4zvOJXgJqUZSTudiA 83AQ== X-Gm-Message-State: AMCzsaWqcMTN1dQXXH3NU/09derxEcULpG688SOLbzISzYboBBBeT3WM dWet+RzAzjTT1E75+KICZ4MB6lcjFKM= X-Received: by 10.233.220.196 with SMTP id q187mr9658313qkf.344.1509044827554; Thu, 26 Oct 2017 12:07:07 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 05/25] sparc: Assume VIS3 support Date: Thu, 26 Oct 2017 17:06:33 -0200 Message-Id: <1509044813-9951-6-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 assumes VIS3 support by binutils, which is support since binutils 2.22. This leads to soem code simplification, mostly on multiarch build where there is no more 2 variant possible (whether binutils supports VIS3 instructions or not). For multiarch files whether HAVE_AS_VIS3_SUPPORT was checked and the default implementation was built with a different name, a new file with (implementation with -generic appended) is added. Checked on sparc64-linux-gnu and sparcv9-linux-gnu. * config.h.in (HAVE_AS_VIS3_SUPPORT): Remove check for VIS3 support. * sysdeps/sparc/configure.ac (HAVE_AS_VIS3_SUPPORT): Likewise. * sysdeps//sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c: Likewise. * sysdeps//sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.c: Likewise. * sysdeps//sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c: Likewise. * sysdeps//sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_floor.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_floorf.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_trunc.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_truncf.c: Likewise. * sysdeps/sparc/sparc-ifunc.h [!HAVE_AS_VIS3_SUPPORT] (SPARC_ASM_VIS3_IFUNC, SPARC_ASM_VIS3_VIS2_IFUNC): Remove macros. * sysdeps/sparc/sparc32/sparcv9/Makefile [$(have-as-vis3) != yes] (ASFLAGS.o, ASFLAGS-.os, ASFLAGS-.op, ASFLAGS-.oS): Remove rules. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile ($(have-as-vis3) == yes): Remove conditional. * sysdeps/sparc/sparc64/Makefile (($(have-as-vis3) == yes)): Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-generic.c: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-generic.c: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-generic.c: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-generic.c: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_ceil-generic.c: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf-generic.c: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_floor-generic.c: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_floorf-generic.c: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_fma-generic.c: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf-generic.c: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_trunc-generic.c: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_truncf-generic.c: New file. Signed-off-by: Adhemerval Zanella --- ChangeLog | 51 ++++++++++++++++++++++ config.h.in | 3 -- sysdeps/sparc/configure | 42 ------------------ sysdeps/sparc/configure.ac | 29 ------------ sysdeps/sparc/sparc-ifunc.h | 13 ------ sysdeps/sparc/sparc32/sparcv9/Makefile | 7 --- .../sparc/sparc32/sparcv9/fpu/multiarch/Makefile | 8 ++-- .../sparc32/sparcv9/fpu/multiarch/s_fdim-generic.c | 4 ++ .../sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c | 17 +++----- .../sparcv9/fpu/multiarch/s_fdimf-generic.c | 3 ++ .../sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.c | 12 +---- .../sparc32/sparcv9/fpu/multiarch/s_fma-generic.c | 2 + .../sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c | 12 ++--- .../sparc32/sparcv9/fpu/multiarch/s_fmaf-generic.c | 2 + .../sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf.c | 10 +---- sysdeps/sparc/sparc64/Makefile | 2 - sysdeps/sparc/sparc64/fpu/multiarch/Makefile | 10 ++--- .../sparc/sparc64/fpu/multiarch/s_ceil-generic.c | 2 + sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.c | 19 ++++---- .../sparc/sparc64/fpu/multiarch/s_ceilf-generic.c | 2 + sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf.c | 19 ++++---- .../sparc/sparc64/fpu/multiarch/s_floor-generic.c | 2 + sysdeps/sparc/sparc64/fpu/multiarch/s_floor.c | 19 ++++---- .../sparc/sparc64/fpu/multiarch/s_floorf-generic.c | 2 + sysdeps/sparc/sparc64/fpu/multiarch/s_floorf.c | 19 ++++---- .../sparc/sparc64/fpu/multiarch/s_fma-generic.c | 2 + sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c | 19 ++++---- .../sparc/sparc64/fpu/multiarch/s_fmaf-generic.c | 2 + sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf.c | 19 ++++---- .../sparc/sparc64/fpu/multiarch/s_trunc-generic.c | 2 + sysdeps/sparc/sparc64/fpu/multiarch/s_trunc.c | 19 ++++---- .../sparc/sparc64/fpu/multiarch/s_truncf-generic.c | 2 + sysdeps/sparc/sparc64/fpu/multiarch/s_truncf.c | 19 ++++---- 33 files changed, 163 insertions(+), 232 deletions(-) create mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-generic.c create mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-generic.c create mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-generic.c create mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-generic.c create mode 100644 sysdeps/sparc/sparc64/fpu/multiarch/s_ceil-generic.c create mode 100644 sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf-generic.c create mode 100644 sysdeps/sparc/sparc64/fpu/multiarch/s_floor-generic.c create mode 100644 sysdeps/sparc/sparc64/fpu/multiarch/s_floorf-generic.c create mode 100644 sysdeps/sparc/sparc64/fpu/multiarch/s_fma-generic.c create mode 100644 sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf-generic.c create mode 100644 sysdeps/sparc/sparc64/fpu/multiarch/s_trunc-generic.c create mode 100644 sysdeps/sparc/sparc64/fpu/multiarch/s_truncf-generic.c -- 2.7.4 diff --git a/config.h.in b/config.h.in index c140ff3..8d76dad 100644 --- a/config.h.in +++ b/config.h.in @@ -50,9 +50,6 @@ /* Defined on SPARC if GCC emits GOTDATA relocations. */ #undef HAVE_GCC_GOTDATA -/* Define on SPARC if AS supports VIS3 instructions. */ -#undef HAVE_AS_VIS3_SUPPORT - /* Define if the linker supports the -z combreloc option. */ #undef HAVE_Z_COMBRELOC diff --git a/sysdeps/sparc/configure b/sysdeps/sparc/configure index 90a86f6..bc6ac14 100644 --- a/sysdeps/sparc/configure +++ b/sysdeps/sparc/configure @@ -1,48 +1,6 @@ # This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/sparc. -# Check for support of VIS3 et al. instructions in the assembler. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sparc assembler VIS3 support" >&5 -$as_echo_n "checking for sparc assembler VIS3 support... " >&6; } -if ${libc_cv_sparc_as_vis3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.S <<\EOF - .text -foo: fmadds %f1, %f2, %f3, %f5 - fmaddd %f2, %f4, %f8, %f10 - fhadds %f2, %f3, %f5 - fhaddd %f4, %f8, %f10 - pdistn %f2, %f4, %g1 - movdtox %f10, %o0 - movstouw %f9, %o1 - movstosw %f7, %o2 - movxtod %o3, %f18 - movwtos %o4, %f15 - flcmps %fcc0, %f3, %f5 - flcmpd %fcc1, %f4, %f6 -EOF -if { ac_try='${CC-cc} -c $CFLAGS -Wa,-Av9d conftest.S' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - libc_cv_sparc_as_vis3=yes -else - libc_cv_sparc_as_vis3=no -fi -rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_sparc_as_vis3" >&5 -$as_echo "$libc_cv_sparc_as_vis3" >&6; } -if test $libc_cv_sparc_as_vis3 = yes; then - $as_echo "#define HAVE_AS_VIS3_SUPPORT 1" >>confdefs.h - -fi -config_vars="$config_vars -have-as-vis3 = $libc_cv_sparc_as_vis3" - # Check for a GCC emitting GOTDATA relocations. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sparc gcc GOTDATA reloc support" >&5 $as_echo_n "checking for sparc gcc GOTDATA reloc support... " >&6; } diff --git a/sysdeps/sparc/configure.ac b/sysdeps/sparc/configure.ac index 982077c..43ad541 100644 --- a/sysdeps/sparc/configure.ac +++ b/sysdeps/sparc/configure.ac @@ -1,35 +1,6 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/sparc. -# Check for support of VIS3 et al. instructions in the assembler. -AC_CACHE_CHECK(for sparc assembler VIS3 support, libc_cv_sparc_as_vis3, [dnl -cat > conftest.S <<\EOF - .text -foo: fmadds %f1, %f2, %f3, %f5 - fmaddd %f2, %f4, %f8, %f10 - fhadds %f2, %f3, %f5 - fhaddd %f4, %f8, %f10 - pdistn %f2, %f4, %g1 - movdtox %f10, %o0 - movstouw %f9, %o1 - movstosw %f7, %o2 - movxtod %o3, %f18 - movwtos %o4, %f15 - flcmps %fcc0, %f3, %f5 - flcmpd %fcc1, %f4, %f6 -EOF -dnl -if AC_TRY_COMMAND([${CC-cc} -c $CFLAGS -Wa,-Av9d conftest.S]); then - libc_cv_sparc_as_vis3=yes -else - libc_cv_sparc_as_vis3=no -fi -rm -f conftest*]) -if test $libc_cv_sparc_as_vis3 = yes; then - AC_DEFINE(HAVE_AS_VIS3_SUPPORT) -fi -LIBC_CONFIG_VAR([have-as-vis3], [$libc_cv_sparc_as_vis3]) - # Check for a GCC emitting GOTDATA relocations. AC_CACHE_CHECK(for sparc gcc GOTDATA reloc support, libc_cv_sparc_gcc_gotdata, [dnl changequote(,)dnl diff --git a/sysdeps/sparc/sparc-ifunc.h b/sysdeps/sparc/sparc-ifunc.h index 044fe36..54420d8 100644 --- a/sysdeps/sparc/sparc-ifunc.h +++ b/sysdeps/sparc/sparc-ifunc.h @@ -137,8 +137,6 @@ END (__##name) SPARC_ASM_IFUNC1(name, HWCAP_SPARC_VIS2, \ __##name##_vis2, __##name##_generic) -# ifdef HAVE_AS_VIS3_SUPPORT - #define SPARC_ASM_VIS3_IFUNC(name) \ SPARC_ASM_IFUNC1(name, HWCAP_SPARC_VIS3, \ __##name##_vis3, __##name##_generic) @@ -149,17 +147,6 @@ END (__##name) HWCAP_SPARC_VIS2, \ __##name##_vis2, __##name##_generic) -# else /* HAVE_AS_VIS3_SUPPORT */ - -#define SPARC_ASM_VIS3_IFUNC(name) \ - SPARC_ASM_IFUNC_DFLT(name, __##name##_generic) - -#define SPARC_ASM_VIS3_VIS2_IFUNC(name) \ - SPARC_ASM_VIS2_IFUNC(name) - -# endif /* HAVE_AS_VIS3_SUPPORT */ - - #else /* __ASSEMBLER__ */ # define INIT_ARCH() diff --git a/sysdeps/sparc/sparc32/sparcv9/Makefile b/sysdeps/sparc/sparc32/sparcv9/Makefile index 526673e..45507ea 100644 --- a/sysdeps/sparc/sparc32/sparcv9/Makefile +++ b/sysdeps/sparc/sparc32/sparcv9/Makefile @@ -1,16 +1,9 @@ sysdep-CFLAGS += -mcpu=ultrasparc -Wa,-Av9a -mvis -ifeq ($(have-as-vis3),yes) ASFLAGS-.o += -Wa,-Av9d ASFLAGS-.os += -Wa,-Av9d ASFLAGS-.op += -Wa,-Av9d ASFLAGS-.oS += -Wa,-Av9d -else -ASFLAGS-.o += -Wa,-Av9a -ASFLAGS-.os += -Wa,-Av9a -ASFLAGS-.op += -Wa,-Av9a -ASFLAGS-.oS += -Wa,-Av9a -endif # nscd uses atomic_spin_nop which in turn requires cpu_relax ifeq ($(subdir),nscd) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile index 2a2d374..62bf6f1 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile @@ -1,13 +1,13 @@ ifeq ($(subdir),math) -ifeq ($(have-as-vis3),yes) libm-sysdep_routines += m_copysignf-vis3 m_copysign-vis3 s_fabs-vis3 \ s_fabsf-vis3 s_llrintf-vis3 s_llrint-vis3 \ s_rintf-vis3 s_rint-vis3 \ - s_fmaf-vis3 s_fma-vis3 s_nearbyint-vis3 \ - s_nearbyintf-vis3 s_fdimf-vis3 s_fdim-vis3 + s_fmaf-vis3 s_fma-vis3 s_fma-generic s_fmaf-generic \ + s_nearbyint-vis3 s_nearbyintf-vis3 \ + s_fdimf-vis3 s_fdim-vis3 s_fdim-generic \ + s_fdimf-generic sysdep_routines += s_copysignf-vis3 s_copysign-vis3 CFLAGS-s_fdimf-vis3.c += -Wa,-Av9d -mvis3 CFLAGS-s_fdim-vis3.c += -Wa,-Av9d -mvis3 endif -endif diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-generic.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-generic.c new file mode 100644 index 0000000..30ee54b --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-generic.c @@ -0,0 +1,4 @@ +#define __fdim __fdim_generic +#define declare_mgen_alias(t, f) + +#include diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c index ff3acd4..fe483f6 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c @@ -16,23 +16,16 @@ License along with the GNU C Library; if not, see . */ -#ifdef HAVE_AS_VIS3_SUPPORT -# include -# include -# include -# include +#include +#include +#include +#include extern double __fdim_vis3 (double, double); extern double __fdim_generic (double, double); sparc_libm_ifunc(__fdim, hwcap & HWCAP_SPARC_VIS3 ? __fdim_vis3 : __fdim_generic); weak_alias (__fdim, fdim) -# if LONG_DOUBLE_COMPAT (libm, FIRST_VERSION_libm_fdiml) +#if LONG_DOUBLE_COMPAT (libm, FIRST_VERSION_libm_fdiml) compat_symbol (libm, __fdim, fdiml, FIRST_VERSION_libm_fdiml); -# endif - -# define __fdim __fdim_generic -# define declare_mgen_alias(t, f) #endif - -#include diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-generic.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-generic.c new file mode 100644 index 0000000..17090b5 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-generic.c @@ -0,0 +1,3 @@ +#define __fdimf __fdimf_generic +#define declare_mgen_alias(t, f) +#include diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.c index cf1dc9e..ced4593 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.c +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.c @@ -16,19 +16,11 @@ License along with the GNU C Library; if not, see . */ -#ifdef HAVE_AS_VIS3_SUPPORT -# include -# include +#include +#include extern float __fdimf_vis3 (float, float); extern float __fdimf_generic (float, float); sparc_libm_ifunc(__fdimf, hwcap & HWCAP_SPARC_VIS3 ? __fdimf_vis3 : __fdimf_generic); weak_alias (__fdimf, fdimf) - -# define __fdimf __fdimf_generic -# define declare_mgen_alias(t, f) - -#endif - -#include diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-generic.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-generic.c new file mode 100644 index 0000000..e40816f --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-generic.c @@ -0,0 +1,2 @@ +#define __fma __fma_generic +#include diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c index 05113c3..3d0c165 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c @@ -1,7 +1,6 @@ -#ifdef HAVE_AS_VIS3_SUPPORT -# include -# include -# include +#include +#include +#include extern double __fma_vis3 (double, double, double); extern double __fma_generic (double, double, double); @@ -11,8 +10,3 @@ weak_alias (__fma, fma) #if LONG_DOUBLE_COMPAT (libm, GLIBC_2_1) compat_symbol (libm, __fma, fmal, GLIBC_2_1); #endif - -# define __fma __fma_generic -#endif - -#include diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-generic.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-generic.c new file mode 100644 index 0000000..218eeb3 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-generic.c @@ -0,0 +1,2 @@ +#define __fmaf __fmaf_generic +#include diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf.c index 7a273a3..5357b47 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf.c +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf.c @@ -1,14 +1,8 @@ -#ifdef HAVE_AS_VIS3_SUPPORT -# include -# include +#include +#include extern float __fmaf_vis3 (float, float, float); extern float __fmaf_generic (float, float, float); sparc_libm_ifunc(__fmaf, hwcap & HWCAP_SPARC_FMAF ? __fmaf_vis3 : __fmaf_generic); weak_alias (__fmaf, fmaf) - -# define __fmaf __fmaf_generic -#endif - -#include diff --git a/sysdeps/sparc/sparc64/Makefile b/sysdeps/sparc/sparc64/Makefile index a5e4036..0963a55 100644 --- a/sysdeps/sparc/sparc64/Makefile +++ b/sysdeps/sparc/sparc64/Makefile @@ -4,12 +4,10 @@ ifeq ($(subdir),string) sysdep_routines += align-cpy endif -ifeq ($(have-as-vis3),yes) ASFLAGS-.o += -Wa,-Av9d ASFLAGS-.os += -Wa,-Av9d ASFLAGS-.op += -Wa,-Av9d ASFLAGS-.oS += -Wa,-Av9d -endif # nscd uses atomic_spin_nop which in turn requires cpu_relax ifeq ($(subdir),nscd) diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/Makefile b/sysdeps/sparc/sparc64/fpu/multiarch/Makefile index 03a271d..2ac4496 100644 --- a/sysdeps/sparc/sparc64/fpu/multiarch/Makefile +++ b/sysdeps/sparc/sparc64/fpu/multiarch/Makefile @@ -1,13 +1,14 @@ ifeq ($(subdir),math) -ifeq ($(have-as-vis3),yes) libm-sysdep_routines += m_signbitf-vis3 m_signbit-vis3 m_finitef-vis3 \ m_finite-vis3 m_isinff-vis3 m_isinf-vis3 \ m_isnanf-vis3 m_isnan-vis3 s_lrintf-vis3 \ s_lrint-vis3 s_rintf-vis3 s_rint-vis3 \ - s_fmaf-vis3 s_fma-vis3 \ + s_fmaf-vis3 s_fma-vis3 s_fmaf-generic s_fma-generic \ s_nearbyint-vis3 s_nearbyintf-vis3 \ - s_ceilf-vis3 s_ceil-vis3 s_floorf-vis3 \ - s_floor-vis3 s_truncf-vis3 s_trunc-vis3 + s_ceilf-vis3 s_ceil-vis3 s_ceilf-generic \ + s_ceil-generic s_floorf-vis3 s_floor-vis3 \ + s_floorf-generic s_floor-generic s_truncf-vis3 \ + s_trunc-vis3 s_truncf-generic s_trunc-generic sysdep_routines += s_signbitf-vis3 s_signbit-vis3 s_finitef-vis3 \ s_finite-vis3 s_isinff-vis3 s_isinf-vis3 \ s_isnanf-vis3 s_isnan-vis3 @@ -19,4 +20,3 @@ CFLAGS-s_floor-vis3.c += -Wa,-Av9d -mvis3 CFLAGS-s_truncf-vis3.c += -Wa,-Av9d -mvis3 CFLAGS-s_trunc-vis3.c += -Wa,-Av9d -mvis3 endif -endif diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_ceil-generic.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_ceil-generic.c new file mode 100644 index 0000000..febea74 --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_ceil-generic.c @@ -0,0 +1,2 @@ +#define __ceil __ceil_generic +#include diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.c index efa05e9..cfd5396 100644 --- a/sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.c +++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.c @@ -16,17 +16,14 @@ License along with the GNU C Library; if not, see . */ -#ifdef HAVE_AS_VIS3_SUPPORT -# include -# include +#include +#include -extern double __ceil_vis3 (double); -extern double __ceil_generic (double); +extern __typeof (ceil) __ceil_vis3 attribute_hidden; +extern __typeof (ceil) __ceil_generic attribute_hidden; -sparc_libm_ifunc(__ceil, hwcap & HWCAP_SPARC_VIS3 ? __ceil_vis3 : __ceil_generic); +sparc_libm_ifunc (__ceil, + hwcap & HWCAP_SPARC_VIS3 + ? __ceil_vis3 + : __ceil_generic) weak_alias (__ceil, ceil) - -# define __ceil __ceil_generic -#endif - -#include diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf-generic.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf-generic.c new file mode 100644 index 0000000..ce75035 --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf-generic.c @@ -0,0 +1,2 @@ +#define __ceilf __ceilf_generic +#include diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf.c index 62ada7f..81897b5 100644 --- a/sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf.c +++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf.c @@ -16,17 +16,14 @@ License along with the GNU C Library; if not, see . */ -#ifdef HAVE_AS_VIS3_SUPPORT -# include -# include +#include +#include -extern float __ceilf_vis3 (float); -extern float __ceilf_generic (float); +extern __typeof (ceilf) __ceilf_vis3 attribute_hidden; +extern __typeof (ceilf) __ceilf_generic attribute_hidden; -sparc_libm_ifunc(__ceilf, hwcap & HWCAP_SPARC_VIS3 ? __ceilf_vis3 : __ceilf_generic); +sparc_libm_ifunc (__ceilf, + hwcap & HWCAP_SPARC_VIS3 + ? __ceilf_vis3 + : __ceilf_generic); weak_alias (__ceilf, ceilf) - -# define __ceilf __ceilf_generic -#endif - -#include diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_floor-generic.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_floor-generic.c new file mode 100644 index 0000000..0f3361a --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_floor-generic.c @@ -0,0 +1,2 @@ +#define __floor __floor_generic +#include diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_floor.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_floor.c index d097f68..9d71158 100644 --- a/sysdeps/sparc/sparc64/fpu/multiarch/s_floor.c +++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_floor.c @@ -16,17 +16,14 @@ License along with the GNU C Library; if not, see . */ -#ifdef HAVE_AS_VIS3_SUPPORT -# include -# include +#include +#include -extern double __floor_vis3 (double); -extern double __floor_generic (double); +extern __typeof (floor) __floor_vis3 attribute_hidden; +extern __typeof (floor) __floor_generic attribute_hidden; -sparc_libm_ifunc(__floor, hwcap & HWCAP_SPARC_VIS3 ? __floor_vis3 : __floor_generic); +sparc_libm_ifunc (__floor, + hwcap & HWCAP_SPARC_VIS3 + ? __floor_vis3 + : __floor_generic); weak_alias (__floor, floor) - -# define __floor __floor_generic -#endif - -#include diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_floorf-generic.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_floorf-generic.c new file mode 100644 index 0000000..28c377b --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_floorf-generic.c @@ -0,0 +1,2 @@ +#define __floorf __floorf_generic +#include diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_floorf.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_floorf.c index 2a6c710..09d0a45 100644 --- a/sysdeps/sparc/sparc64/fpu/multiarch/s_floorf.c +++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_floorf.c @@ -16,17 +16,14 @@ License along with the GNU C Library; if not, see . */ -#ifdef HAVE_AS_VIS3_SUPPORT -# include -# include +#include +#include -extern float __floorf_vis3 (float); -extern float __floorf_generic (float); +extern __typeof (floorf) __floorf_vis3 attribute_hidden; +extern __typeof (floorf) __floorf_generic attribute_hidden; -sparc_libm_ifunc(__floorf, hwcap & HWCAP_SPARC_VIS3 ? __floorf_vis3 : __floorf_generic); +sparc_libm_ifunc (__floorf, + hwcap & HWCAP_SPARC_VIS3 + ? __floorf_vis3 + : __floorf_generic); weak_alias (__floorf, floorf) - -# define __floorf __floorf_generic -#endif - -#include diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_fma-generic.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_fma-generic.c new file mode 100644 index 0000000..e40816f --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_fma-generic.c @@ -0,0 +1,2 @@ +#define __fma __fma_generic +#include diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c index 3f2f162..1b2701c 100644 --- a/sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c +++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c @@ -1,14 +1,11 @@ -#ifdef HAVE_AS_VIS3_SUPPORT -# include -# include +#include +#include -extern double __fma_vis3 (double, double, double); -extern double __fma_generic (double, double, double); +extern __typeof (fma) __fma_vis3 attribute_hidden; +extern __typeof (fma) __fma_generic attribute_hidden; -sparc_libm_ifunc(__fma, hwcap & HWCAP_SPARC_FMAF ? __fma_vis3 : __fma_generic); +sparc_libm_ifunc (__fma, + hwcap & HWCAP_SPARC_FMAF + ? __fma_vis3 + : __fma_generic); weak_alias (__fma, fma) - -# define __fma __fma_generic -#endif - -#include diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf-generic.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf-generic.c new file mode 100644 index 0000000..218eeb3 --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf-generic.c @@ -0,0 +1,2 @@ +#define __fmaf __fmaf_generic +#include diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf.c index 7a273a3..dbed10e 100644 --- a/sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf.c +++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf.c @@ -1,14 +1,11 @@ -#ifdef HAVE_AS_VIS3_SUPPORT -# include -# include +#include +#include -extern float __fmaf_vis3 (float, float, float); -extern float __fmaf_generic (float, float, float); +extern __typeof (fmaf) __fmaf_vis3 attribute_hidden; +extern __typeof (fmaf) __fmaf_generic attribute_hidden; -sparc_libm_ifunc(__fmaf, hwcap & HWCAP_SPARC_FMAF ? __fmaf_vis3 : __fmaf_generic); +sparc_libm_ifunc (__fmaf, + hwcap & HWCAP_SPARC_FMAF + ? __fmaf_vis3 + : __fmaf_generic) weak_alias (__fmaf, fmaf) - -# define __fmaf __fmaf_generic -#endif - -#include diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_trunc-generic.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_trunc-generic.c new file mode 100644 index 0000000..00abd2a --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_trunc-generic.c @@ -0,0 +1,2 @@ +#define __trunc __trunc_generic +#include diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_trunc.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_trunc.c index dc67f42..3fd9cc0 100644 --- a/sysdeps/sparc/sparc64/fpu/multiarch/s_trunc.c +++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_trunc.c @@ -16,17 +16,14 @@ License along with the GNU C Library; if not, see . */ -#ifdef HAVE_AS_VIS3_SUPPORT -# include -# include +#include +#include -extern double __trunc_vis3 (double); -extern double __trunc_generic (double); +extern __typeof (trunc) __trunc_vis3 attribute_hidden; +extern __typeof (trunc) __trunc_generic attribute_hidden; -sparc_libm_ifunc(__trunc, hwcap & HWCAP_SPARC_VIS3 ? __trunc_vis3 : __trunc_generic); +sparc_libm_ifunc (__trunc, + hwcap & HWCAP_SPARC_VIS3 + ? __trunc_vis3 + : __trunc_generic); weak_alias (__trunc, trunc) - -# define __trunc __trunc_generic -#endif - -#include diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_truncf-generic.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_truncf-generic.c new file mode 100644 index 0000000..7e5d91e --- /dev/null +++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_truncf-generic.c @@ -0,0 +1,2 @@ +#define __truncf __truncf_generic +#include diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_truncf.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_truncf.c index 980a313..3c1fa36 100644 --- a/sysdeps/sparc/sparc64/fpu/multiarch/s_truncf.c +++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_truncf.c @@ -16,17 +16,14 @@ License along with the GNU C Library; if not, see . */ -#ifdef HAVE_AS_VIS3_SUPPORT -# include -# include +#include +#include -extern float __truncf_vis3 (float); -extern float __truncf_generic (float); +extern __typeof (truncf) __truncf_vis3 attribute_hidden; +extern __typeof (truncf) __truncf_generic attribute_hidden; -sparc_libm_ifunc(__truncf, hwcap & HWCAP_SPARC_VIS3 ? __truncf_vis3 : __truncf_generic); +sparc_libm_ifunc (__truncf, + hwcap & HWCAP_SPARC_VIS3 + ? __truncf_vis3 + : __truncf_generic) weak_alias (__truncf, truncf) - -# define __truncf __truncf_generic -#endif - -#include