Message ID | 1509044813-9951-6-git-send-email-adhemerval.zanella@linaro.org |
---|---|
State | Accepted |
Commit | a55430cb0e261834ce7a4e118dd9e0f2b7fb14bc |
Headers | show |
Series | Refactor IFUNC selection in C | expand |
If no one opposes it, I will commit it shortly. On 26/10/2017 17:06, Adhemerval Zanella wrote: > 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 <adhemerval.zanella@linaro.org> > --- > 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 > > 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 <math/s_fdim.c> > 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 > <http://www.gnu.org/licenses/>. */ > > -#ifdef HAVE_AS_VIS3_SUPPORT > -# include <math_ldbl_opt.h> > -# include <first-versions.h> > -# include <sparc-ifunc.h> > -# include <math.h> > +#include <math_ldbl_opt.h> > +#include <first-versions.h> > +#include <sparc-ifunc.h> > +#include <math.h> > > 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 <math/s_fdim.c> > 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 <math/s_fdimf.c> > 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 > <http://www.gnu.org/licenses/>. */ > > -#ifdef HAVE_AS_VIS3_SUPPORT > -# include <sparc-ifunc.h> > -# include <math.h> > +#include <sparc-ifunc.h> > +#include <math.h> > > 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 <math/s_fdimf.c> > 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 <sysdeps/ieee754/dbl-64/s_fma.c> > 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 <sparc-ifunc.h> > -# include <math.h> > -# include <math_ldbl_opt.h> > +#include <sparc-ifunc.h> > +#include <math.h> > +#include <math_ldbl_opt.h> > > 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 <sysdeps/ieee754/dbl-64/s_fma.c> > 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 <sysdeps/ieee754/dbl-64/s_fmaf.c> > 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 <sparc-ifunc.h> > -# include <math.h> > +#include <sparc-ifunc.h> > +#include <math.h> > > 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 <sysdeps/ieee754/dbl-64/s_fmaf.c> > 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 <sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c> > 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 > <http://www.gnu.org/licenses/>. */ > > -#ifdef HAVE_AS_VIS3_SUPPORT > -# include <sparc-ifunc.h> > -# include <math.h> > +#include <sparc-ifunc.h> > +#include <math.h> > > -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 <sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c> > 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 <sysdeps/ieee754/flt-32/s_ceilf.c> > 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 > <http://www.gnu.org/licenses/>. */ > > -#ifdef HAVE_AS_VIS3_SUPPORT > -# include <sparc-ifunc.h> > -# include <math.h> > +#include <sparc-ifunc.h> > +#include <math.h> > > -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 <sysdeps/ieee754/flt-32/s_ceilf.c> > 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 <sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c> > 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 > <http://www.gnu.org/licenses/>. */ > > -#ifdef HAVE_AS_VIS3_SUPPORT > -# include <sparc-ifunc.h> > -# include <math.h> > +#include <sparc-ifunc.h> > +#include <math.h> > > -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 <sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c> > 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 <sysdeps/ieee754/flt-32/s_floorf.c> > 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 > <http://www.gnu.org/licenses/>. */ > > -#ifdef HAVE_AS_VIS3_SUPPORT > -# include <sparc-ifunc.h> > -# include <math.h> > +#include <sparc-ifunc.h> > +#include <math.h> > > -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 <sysdeps/ieee754/flt-32/s_floorf.c> > 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 <sysdeps/ieee754/dbl-64/s_fma.c> > 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 <sparc-ifunc.h> > -# include <math.h> > +#include <sparc-ifunc.h> > +#include <math.h> > > -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 <sysdeps/ieee754/dbl-64/s_fma.c> > 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 <sysdeps/ieee754/dbl-64/s_fmaf.c> > 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 <sparc-ifunc.h> > -# include <math.h> > +#include <sparc-ifunc.h> > +#include <math.h> > > -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 <sysdeps/ieee754/dbl-64/s_fmaf.c> > 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 <sysdeps/ieee754/dbl-64/wordsize-64/s_trunc.c> > 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 > <http://www.gnu.org/licenses/>. */ > > -#ifdef HAVE_AS_VIS3_SUPPORT > -# include <sparc-ifunc.h> > -# include <math.h> > +#include <sparc-ifunc.h> > +#include <math.h> > > -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 <sysdeps/ieee754/dbl-64/wordsize-64/s_trunc.c> > 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 <sysdeps/ieee754/flt-32/s_truncf.c> > 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 > <http://www.gnu.org/licenses/>. */ > > -#ifdef HAVE_AS_VIS3_SUPPORT > -# include <sparc-ifunc.h> > -# include <math.h> > +#include <sparc-ifunc.h> > +#include <math.h> > > -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 <sysdeps/ieee754/flt-32/s_truncf.c> >
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 <math/s_fdim.c> 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 <http://www.gnu.org/licenses/>. */ -#ifdef HAVE_AS_VIS3_SUPPORT -# include <math_ldbl_opt.h> -# include <first-versions.h> -# include <sparc-ifunc.h> -# include <math.h> +#include <math_ldbl_opt.h> +#include <first-versions.h> +#include <sparc-ifunc.h> +#include <math.h> 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 <math/s_fdim.c> 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 <math/s_fdimf.c> 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 <http://www.gnu.org/licenses/>. */ -#ifdef HAVE_AS_VIS3_SUPPORT -# include <sparc-ifunc.h> -# include <math.h> +#include <sparc-ifunc.h> +#include <math.h> 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 <math/s_fdimf.c> 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 <sysdeps/ieee754/dbl-64/s_fma.c> 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 <sparc-ifunc.h> -# include <math.h> -# include <math_ldbl_opt.h> +#include <sparc-ifunc.h> +#include <math.h> +#include <math_ldbl_opt.h> 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 <sysdeps/ieee754/dbl-64/s_fma.c> 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 <sysdeps/ieee754/dbl-64/s_fmaf.c> 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 <sparc-ifunc.h> -# include <math.h> +#include <sparc-ifunc.h> +#include <math.h> 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 <sysdeps/ieee754/dbl-64/s_fmaf.c> 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 <sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c> 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 <http://www.gnu.org/licenses/>. */ -#ifdef HAVE_AS_VIS3_SUPPORT -# include <sparc-ifunc.h> -# include <math.h> +#include <sparc-ifunc.h> +#include <math.h> -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 <sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c> 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 <sysdeps/ieee754/flt-32/s_ceilf.c> 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 <http://www.gnu.org/licenses/>. */ -#ifdef HAVE_AS_VIS3_SUPPORT -# include <sparc-ifunc.h> -# include <math.h> +#include <sparc-ifunc.h> +#include <math.h> -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 <sysdeps/ieee754/flt-32/s_ceilf.c> 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 <sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c> 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 <http://www.gnu.org/licenses/>. */ -#ifdef HAVE_AS_VIS3_SUPPORT -# include <sparc-ifunc.h> -# include <math.h> +#include <sparc-ifunc.h> +#include <math.h> -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 <sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c> 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 <sysdeps/ieee754/flt-32/s_floorf.c> 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 <http://www.gnu.org/licenses/>. */ -#ifdef HAVE_AS_VIS3_SUPPORT -# include <sparc-ifunc.h> -# include <math.h> +#include <sparc-ifunc.h> +#include <math.h> -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 <sysdeps/ieee754/flt-32/s_floorf.c> 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 <sysdeps/ieee754/dbl-64/s_fma.c> 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 <sparc-ifunc.h> -# include <math.h> +#include <sparc-ifunc.h> +#include <math.h> -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 <sysdeps/ieee754/dbl-64/s_fma.c> 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 <sysdeps/ieee754/dbl-64/s_fmaf.c> 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 <sparc-ifunc.h> -# include <math.h> +#include <sparc-ifunc.h> +#include <math.h> -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 <sysdeps/ieee754/dbl-64/s_fmaf.c> 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 <sysdeps/ieee754/dbl-64/wordsize-64/s_trunc.c> 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 <http://www.gnu.org/licenses/>. */ -#ifdef HAVE_AS_VIS3_SUPPORT -# include <sparc-ifunc.h> -# include <math.h> +#include <sparc-ifunc.h> +#include <math.h> -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 <sysdeps/ieee754/dbl-64/wordsize-64/s_trunc.c> 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 <sysdeps/ieee754/flt-32/s_truncf.c> 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 <http://www.gnu.org/licenses/>. */ -#ifdef HAVE_AS_VIS3_SUPPORT -# include <sparc-ifunc.h> -# include <math.h> +#include <sparc-ifunc.h> +#include <math.h> -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 <sysdeps/ieee754/flt-32/s_truncf.c>
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 <adhemerval.zanella@linaro.org> --- 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