sparc: Assume VIS3 support

This patch assumes VIS3 support by binutils, which is supported since
version 2.22.  This leads to some code simplification, mostly on
multiarch build where there is only one variant instead of previously
two (whether binutils supports VIS3 instructions or not).

For multiarch files where 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>
This commit is contained in:
Adhemerval Zanella 2017-10-12 19:43:50 -03:00
parent 0609ec0a74
commit a55430cb0e
33 changed files with 153 additions and 232 deletions

View File

@ -1,3 +1,44 @@
2017-11-29 Adhemerval Zanella <adhemerval.zanella@linaro.org>
* 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.
2017-11-29 Joseph Myers <joseph@codesourcery.com>
* sysdeps/ia64/fpu/libm-symbols.h: Include <libm-alias-double.h>.

View File

@ -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

View File

@ -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; }

View File

@ -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

View File

@ -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()

View File

@ -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)

View File

@ -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

View File

@ -0,0 +1,4 @@
#define __fdim __fdim_generic
#define declare_mgen_alias(t, f)
#include <math/s_fdim.c>

View File

@ -16,7 +16,6 @@
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>
@ -30,9 +29,3 @@ weak_alias (__fdim, fdim)
#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>

View File

@ -0,0 +1,3 @@
#define __fdimf __fdimf_generic
#define declare_mgen_alias(t, f)
#include <math/s_fdimf.c>

View File

@ -16,7 +16,6 @@
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>
@ -25,10 +24,3 @@ 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>

View File

@ -0,0 +1,2 @@
#define __fma __fma_generic
#include <sysdeps/ieee754/dbl-64/s_fma.c>

View File

@ -1,4 +1,3 @@
#ifdef HAVE_AS_VIS3_SUPPORT
#include <sparc-ifunc.h>
#include <math.h>
#include <math_ldbl_opt.h>
@ -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>

View File

@ -0,0 +1,2 @@
#define __fmaf __fmaf_generic
#include <sysdeps/ieee754/dbl-64/s_fmaf.c>

View File

@ -1,4 +1,3 @@
#ifdef HAVE_AS_VIS3_SUPPORT
#include <sparc-ifunc.h>
#include <math.h>
@ -7,8 +6,3 @@ 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>

View File

@ -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)

View File

@ -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

View File

@ -0,0 +1,2 @@
#define __ceil __ceil_generic
#include <sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c>

View File

@ -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>
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>

View File

@ -0,0 +1,2 @@
#define __ceilf __ceilf_generic
#include <sysdeps/ieee754/flt-32/s_ceilf.c>

View File

@ -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>
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>

View File

@ -0,0 +1,2 @@
#define __floor __floor_generic
#include <sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c>

View File

@ -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>
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>

View File

@ -0,0 +1,2 @@
#define __floorf __floorf_generic
#include <sysdeps/ieee754/flt-32/s_floorf.c>

View File

@ -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>
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>

View File

@ -0,0 +1,2 @@
#define __fma __fma_generic
#include <sysdeps/ieee754/dbl-64/s_fma.c>

View File

@ -1,14 +1,11 @@
#ifdef HAVE_AS_VIS3_SUPPORT
#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>

View File

@ -0,0 +1,2 @@
#define __fmaf __fmaf_generic
#include <sysdeps/ieee754/dbl-64/s_fmaf.c>

View File

@ -1,14 +1,11 @@
#ifdef HAVE_AS_VIS3_SUPPORT
#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>

View File

@ -0,0 +1,2 @@
#define __trunc __trunc_generic
#include <sysdeps/ieee754/dbl-64/wordsize-64/s_trunc.c>

View File

@ -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>
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>

View File

@ -0,0 +1,2 @@
#define __truncf __truncf_generic
#include <sysdeps/ieee754/flt-32/s_truncf.c>

View File

@ -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>
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>