diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 19:01:57 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 19:01:57 +0000 |
commit | cab56836b146bc129f1ad43f0393d95a9deca63a (patch) | |
tree | 4f4e655319bbac78fca170da05275c127429b460 /sysdeps/sparc/sparc32/sparcv9/fpu/multiarch | |
parent | 04ac1241a4cd004872282c2c82ec37fa33925292 (diff) | |
parent | 82dd75a7f436a19047325d62182590c9f9e23a78 (diff) |
Merge branch 't/tls' into refs/top-bases/t/tls-threadvar
Diffstat (limited to 'sysdeps/sparc/sparc32/sparcv9/fpu/multiarch')
79 files changed, 427 insertions, 1172 deletions
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile index 0d92813d7b..1a26ee19c3 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile @@ -1,15 +1,23 @@ ifeq ($(subdir),math) -libm-sysdep_routines += s_ceil-vis2 s_ceilf-vis2 \ - s_floor-vis2 s_floorf-vis2 -ifeq ($(have-as-vis3),yes) -libm-sysdep_routines += m_copysignf-vis3 m_copysign-vis3 s_ceilf-vis3 \ - s_ceil-vis3 s_fabs-vis3 s_fabsf-vis3 s_floor-vis3 \ - s_floorf-vis3 s_llrintf-vis3 s_llrint-vis3 \ - s_rintf-vis3 s_rint-vis3 w_sqrt-vis3 w_sqrtf-vis3 \ - s_fminf-vis3 s_fmin-vis3 s_fmaxf-vis3 s_fmax-vis3 \ - s_fmaf-vis3 s_fma-vis3 s_fdimf-vis3 s_fdim-vis3 \ - s_nearbyint-vis3 s_nearbyintf-vis3 s_truncf-vis3 \ - s_trunc-vis3 -sysdep_routines += s_copysignf-vis3 s_copysign-vis3 -endif + +# These functions are built both for libc and libm because they're required +# by printf. While the libc objects have the prefix s_, the libm ones are +# prefixed with m_. +sysdep_calls := s_copysignf-vis3 s_copysign-vis3 s_copysignf-generic \ + s_copysign-generic + +sysdep_routines += $(sysdep_calls) +libm-sysdep_routines += s_fabs-vis3 s_fabsf-vis3 s_fabs-generic \ + s_fabsf-generic s_llrintf-vis3 s_llrint-vis3 \ + s_llrintf-generic s_llrint-generic \ + s_rintf-vis3 s_rint-vis3 s_rintf-generic \ + s_rint-generic s_fmaf-vis3 s_fma-vis3 s_fma-generic \ + s_fmaf-generic s_nearbyint-vis3 s_nearbyintf-vis3 \ + s_nearbyint-generic s_nearbyintf-generic \ + s_fdimf-vis3 s_fdim-vis3 s_fdim-generic \ + s_fdimf-generic \ + $(sysdep_calls:s_%=m_%) + +CFLAGS-s_fdimf-vis3.c += -Wa,-Av9d -mvis3 +CFLAGS-s_fdim-vis3.c += -Wa,-Av9d -mvis3 endif diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis2.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis2.S deleted file mode 100644 index edc24b3064..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis2.S +++ /dev/null @@ -1,61 +0,0 @@ -/* ceil function, sparc32 v9 vis2 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David S. Miller <davem@davemloft.net>, 2013. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <sysdep.h> - - /* 'siam' (Set Interval Arithmetic Mode) is used to quickly override - the rounding mode during this routine. - - We add then subtract (or subtract than add if the initial - value was negative) 2**23 to the value, then subtract it - back out. - - This will clear out the fractional portion of the value and, - with suitable 'siam' initiated rouding mode settings, round - the final result in the proper direction. */ - -#define TWO_FIFTYTWO 0x43300000 /* 2**52 */ - -#define ZERO %f10 /* 0.0 */ -#define SIGN_BIT %f12 /* -0.0 */ - -ENTRY (__ceil_vis2) - sethi %hi(TWO_FIFTYTWO), %o2 - sllx %o0, 32, %o0 - or %o0, %o1, %o0 - stx %o0, [%sp + 72] - sllx %o2, 32, %o2 - fzero ZERO - ldd [%sp + 72], %f0 - fnegd ZERO, SIGN_BIT - stx %o2, [%sp + 72] - fabsd %f0, %f14 - ldd [%sp + 72], %f16 - fcmpd %fcc3, %f14, %f16 - fmovduge %fcc3, ZERO, %f16 - fand %f0, SIGN_BIT, SIGN_BIT - for %f16, SIGN_BIT, %f16 - siam (1 << 2) | 2 - faddd %f0, %f16, %f18 - siam (1 << 2) | 0 - fsubd %f18, %f16, %f18 - siam (0 << 2) - retl - for %f18, SIGN_BIT, %f0 -END (__ceil_vis2) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis3.S deleted file mode 100644 index 8b14c6896a..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis3.S +++ /dev/null @@ -1,62 +0,0 @@ -/* ceil function, sparc32 v9 vis3 version. - Copyright (C) 2012-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David S. Miller <davem@davemloft.net>, 2012. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <sysdep.h> - - /* 'siam' (Set Interval Arithmetic Mode) is used to quickly override - the rounding mode during this routine. - - We add then subtract (or subtract than add if the initial - value was negative) 2**23 to the value, then subtract it - back out. - - This will clear out the fractional portion of the value and, - with suitable 'siam' initiated rouding mode settings, round - the final result in the proper direction. - - We also use VIS3 moves to avoid using the stack to transfer - values between float and integer registers. */ - -#define TWO_FIFTYTWO 0x43300000 /* 2**52 */ - -#define ZERO %f10 /* 0.0 */ -#define SIGN_BIT %f12 /* -0.0 */ - -ENTRY (__ceil_vis3) - sethi %hi(TWO_FIFTYTWO), %o2 - sllx %o0, 32, %o0 - sllx %o2, 32, %o2 - or %o0, %o1, %o0 - movxtod %o0, %f0 - fzero ZERO - fnegd ZERO, SIGN_BIT - movxtod %o2, %f16 - fabsd %f0, %f14 - fcmpd %fcc3, %f14, %f16 - fmovduge %fcc3, ZERO, %f16 - fand %f0, SIGN_BIT, SIGN_BIT - for %f16, SIGN_BIT, %f16 - siam (1 << 2) | 2 - faddd %f0, %f16, %f18 - siam (1 << 2) | 0 - fsubd %f18, %f16, %f18 - siam (0 << 2) - retl - for %f18, SIGN_BIT, %f0 -END (__ceil_vis3) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S deleted file mode 100644 index efc8d49365..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S +++ /dev/null @@ -1,19 +0,0 @@ -#include <sparc-ifunc.h> -#include <math_ldbl_opt.h> - -SPARC_ASM_VIS3_VIS2_IFUNC(ceil) - -weak_alias (__ceil, ceil) - -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __ceil, ceill, GLIBC_2_0) -#endif - -# undef weak_alias -# define weak_alias(a, b) -# undef compat_symbol -# define compat_symbol(a, b, c, d) - -#define __ceil __ceil_generic - -#include "../s_ceil.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis2.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis2.S deleted file mode 100644 index 019681b5f2..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis2.S +++ /dev/null @@ -1,58 +0,0 @@ -/* Float ceil function, sparc32 v9 vis2 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David S. Miller <davem@davemloft.net>, 2013. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <sysdep.h> - - /* 'siam' (Set Interval Arithmetic Mode) is used to quickly override - the rounding mode during this routine. - - We add then subtract (or subtract than add if the initial - value was negative) 2**23 to the value, then subtract it - back out. - - This will clear out the fractional portion of the value and, - with suitable 'siam' initiated rouding mode settings, round - the final result in the proper direction. */ - -#define TWO_TWENTYTHREE 0x4b000000 /* 2**23 */ - -#define ZERO %f10 /* 0.0 */ -#define SIGN_BIT %f12 /* -0.0 */ - -ENTRY (__ceilf_vis2) - st %o0, [%sp + 68] - sethi %hi(TWO_TWENTYTHREE), %o2 - fzeros ZERO - ld [%sp + 68], %f0 - fnegs ZERO, SIGN_BIT - st %o2, [%sp + 68] - fabss %f0, %f14 - ld [%sp + 68], %f16 - fcmps %fcc3, %f14, %f16 - fmovsuge %fcc3, ZERO, %f16 - fands %f0, SIGN_BIT, SIGN_BIT - fors %f16, SIGN_BIT, %f16 - siam (1 << 2) | 2 - fadds %f0, %f16, %f1 - siam (1 << 2) | 0 - fsubs %f1, %f16, %f1 - siam (0 << 2) - retl - fors %f1, SIGN_BIT, %f0 -END (__ceilf_vis2) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis3.S deleted file mode 100644 index 1bf306a115..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis3.S +++ /dev/null @@ -1,59 +0,0 @@ -/* Float ceil function, sparc32 v9 vis3 version. - Copyright (C) 2012-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David S. Miller <davem@davemloft.net>, 2012. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <sysdep.h> - - /* 'siam' (Set Interval Arithmetic Mode) is used to quickly override - the rounding mode during this routine. - - We add then subtract (or subtract than add if the initial - value was negative) 2**23 to the value, then subtract it - back out. - - This will clear out the fractional portion of the value and, - with suitable 'siam' initiated rouding mode settings, round - the final result in the proper direction. - - We also use VIS3 moves to avoid using the stack to transfer - values between float and integer registers. */ - -#define TWO_TWENTYTHREE 0x4b000000 /* 2**23 */ - -#define ZERO %f10 /* 0.0 */ -#define SIGN_BIT %f12 /* -0.0 */ - -ENTRY (__ceilf_vis3) - movwtos %o0, %f0 - sethi %hi(TWO_TWENTYTHREE), %o2 - fzeros ZERO - fnegs ZERO, SIGN_BIT - movwtos %o2, %f16 - fabss %f0, %f14 - fcmps %fcc3, %f14, %f16 - fmovsuge %fcc3, ZERO, %f16 - fands %f0, SIGN_BIT, SIGN_BIT - fors %f16, SIGN_BIT, %f16 - siam (1 << 2) | 2 - fadds %f0, %f16, %f1 - siam (1 << 2) | 0 - fsubs %f1, %f16, %f1 - siam (0 << 2) - retl - fors %f1, SIGN_BIT, %f0 -END (__ceilf_vis3) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf.S deleted file mode 100644 index 1c72a5728e..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf.S +++ /dev/null @@ -1,12 +0,0 @@ -#include <sparc-ifunc.h> - -SPARC_ASM_VIS3_VIS2_IFUNC(ceilf) - -weak_alias (__ceilf, ceilf) - -# undef weak_alias -# define weak_alias(a, b) - -#define __ceilf __ceilf_generic - -#include "../s_ceilf.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-generic.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-generic.S new file mode 100644 index 0000000000..9aa3486277 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-generic.S @@ -0,0 +1,8 @@ +#include <math_ldbl_opt.h> +#include <libm-alias-double.h> +#define __copysign __copysign_generic +#undef libm_alias_double +#define libm_alias_double(a, b) +#undef compat_symbol +#define compat_symbol(a, b, c, d) +#include <sysdeps/sparc/sparc32/fpu/s_copysign.S> diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-vis3.S index 802c77217d..8d6b047618 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-vis3.S @@ -1,5 +1,5 @@ /* copysign function, sparc32 vis3 version. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S deleted file mode 100644 index cdd98c00f4..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S +++ /dev/null @@ -1,12 +0,0 @@ -#include <sparc-ifunc.h> - -SPARC_ASM_VIS3_IFUNC(copysign) - -weak_alias (__copysign, copysign) - -# undef weak_alias -# define weak_alias(a, b) - -#define __copysign __copysign_generic - -#include "../../../fpu/s_copysign.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.c index 8ccee58ef1..291e697d99 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.c @@ -1,5 +1,5 @@ -/* sqrt function. sparc32 v9 vis3 version. - Copyright (C) 2012-2016 Free Software Foundation, Inc. +/* copysign ifunc resolver, Linux/sparc32 version. + Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,34 +16,22 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <sysdep.h> +#define __copysign __redirect_copysign +#include <math.h> +#include <math_ldbl_opt.h> +#undef __copysign +#include <libm-alias-double.h> +#include <sparc-ifunc.h> -ENTRY (__sqrt_vis3) - movwtos %o0, %f0 - fzero %f8 - movwtos %o1, %f1 - fcmpd %f0, %f8 - fbl 1f - nop -8: retl - fsqrtd %f0, %f0 -1: -#ifdef SHARED - SETUP_PIC_REG_LEAF(o5, g1) - sethi %gdop_hix22(_LIB_VERSION), %g1 - xor %g1, %gdop_lox10(_LIB_VERSION), %g1 - ld [%o5 + %g1], %g1, %gdop(_LIB_VERSION) -#else - sethi %hi(_LIB_VERSION), %g1 - or %g1, %lo(_LIB_VERSION), %g1 +extern __typeof (__redirect_copysign) __copysign_vis3 attribute_hidden; +extern __typeof (__redirect_copysign) __copysign_generic attribute_hidden; + +sparc_libm_ifunc_redirected (__redirect_copysign, __copysign, + hwcap & HWCAP_SPARC_VIS3 + ? __copysign_vis3 + : __copysign_generic); +libm_alias_double (__copysign, copysign) + +#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0) +compat_symbol (libc, __copysign, copysignl, GLIBC_2_0); #endif - ld [%g1], %g1 - cmp %g1, -1 - be 8b - mov %o0, %o2 - mov %o1, %o3 - mov 26, %o4 - mov %o7, %g1 - call __kernel_standard - mov %g1, %o7 -END (__sqrt_vis3) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-generic.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-generic.S new file mode 100644 index 0000000000..685027500a --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-generic.S @@ -0,0 +1,5 @@ +#include <libm-alias-float.h> +#define __copysignf __copysignf_generic +#undef libm_alias_float +#define libm_alias_float(a, b) +#include <sysdeps/sparc/sparc32/fpu/s_copysignf.S> diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-vis3.S index 82ce4adf2c..dfe48da8e2 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-vis3.S @@ -1,5 +1,5 @@ /* float copysign function, sparc32 vis3 version. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.S deleted file mode 100644 index cd409550de..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.S +++ /dev/null @@ -1,12 +0,0 @@ -#include <sparc-ifunc.h> - -SPARC_ASM_VIS3_IFUNC(copysignf) - -weak_alias (__copysignf, copysignf) - -# undef weak_alias -# define weak_alias(a, b) - -#define __copysignf __copysignf_generic - -#include "../../../fpu/s_copysignf.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.c new file mode 100644 index 0000000000..c051167b48 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.c @@ -0,0 +1,30 @@ +/* copysign ifunc resolver, Linux/sparc32 version. + Copyright (C) 2017-2018 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <math.h> +#include <sparc-ifunc.h> +#include <libm-alias-float.h> + +extern __typeof (copysignf) __copysignf_vis3 attribute_hidden; +extern __typeof (copysignf) __copysignf_generic attribute_hidden; + +sparc_libm_ifunc (__copysignf, + hwcap & HWCAP_SPARC_VIS3 + ? __copysignf_vis3 + : __copysignf_generic); +libm_alias_float (__copysign, copysign) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-generic.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-generic.S new file mode 100644 index 0000000000..267dbd2352 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-generic.S @@ -0,0 +1,5 @@ +#include <libm-alias-double.h> +#define __fabs __fabs_generic +#undef libm_alias_double +#define libm_alias_double(a, b) +#include <sysdeps/sparc/sparc32/fpu/s_fabs.S> diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-vis3.S index ea40b6fb66..e183d7d138 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-vis3.S @@ -1,5 +1,5 @@ /* Float absolute value, sparc32+v9 vis3 version. - Copyright (C) 2011-2016 Free Software Foundation, Inc. + Copyright (C) 2011-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S deleted file mode 100644 index 86c63989a4..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S +++ /dev/null @@ -1,12 +0,0 @@ -#include <sparc-ifunc.h> - -SPARC_ASM_VIS3_IFUNC(fabs) - -weak_alias (__fabs, fabs) - -# undef weak_alias -# define weak_alias(a, b) - -#define __fabs __fabs_generic - -#include "../s_fabs.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.c new file mode 100644 index 0000000000..e4edf0124d --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.c @@ -0,0 +1,32 @@ +/* fabs ifunc resolver, Linux/sparc32 version. + Copyright (C) 2017-2018 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#define __fabs __redirect_fabs +#include <math.h> +#undef __fabs +#include <sparc-ifunc.h> +#include <libm-alias-double.h> + +extern __typeof (__redirect_fabs) __fabs_vis3 attribute_hidden; +extern __typeof (__redirect_fabs) __fabs_generic attribute_hidden; + +sparc_libm_ifunc_redirected (__redirect_fabs, __fabs, + hwcap & HWCAP_SPARC_VIS3 + ? __fabs_vis3 + : __fabs_generic); +libm_alias_double (__fabs, fabs) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-generic.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-generic.S new file mode 100644 index 0000000000..b6fb38f34c --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-generic.S @@ -0,0 +1,5 @@ +#include <libm-alias-float.h> +#define __fabsf __fabsf_generic +#undef libm_alias_float +#define libm_alias_float(a, b) +#include <sysdeps/sparc/sparc32/fpu/s_fabsf.S> diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-vis3.S index be44e85719..805da5ed07 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-vis3.S @@ -1,5 +1,5 @@ /* Float absolute value, sparc32 vis3 version. - Copyright (C) 2006-2016 Free Software Foundation, Inc. + Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2006. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf.S deleted file mode 100644 index 0f2e11e01f..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf.S +++ /dev/null @@ -1,12 +0,0 @@ -#include <sparc-ifunc.h> - -SPARC_ASM_VIS3_IFUNC(fabsf) - -weak_alias (__fabsf, fabsf) - -# undef weak_alias -# define weak_alias(a, b) - -#define __fabsf __fabsf_generic - -#include "../../../fpu/s_fabsf.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf.c index 4a479b1a59..252ad8f714 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf.c @@ -1,7 +1,6 @@ -/* Compute positive difference, sparc 32-bit+v9+vis3. - Copyright (C) 2013-2016 Free Software Foundation, Inc. +/* fabsf ifunc resolver, Linux/sparc32 version. + Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by David S. Miller <davem@davemloft.net>. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -17,18 +16,15 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <sysdep.h> +#include <math.h> +#include <sparc-ifunc.h> +#include <libm-alias-float.h> -ENTRY(__fdim_vis3) - movwtos %o0, %f0 - movwtos %o1, %f1 - movwtos %o2, %f2 - movwtos %o3, %f3 - fcmpd %f0, %f2 - fbug 1f - nop - fzero %f0 - fnegd %f0, %f2 -1: retl - fsubd %f0, %f2, %f0 -END(__fdim_vis3) +extern __typeof (fabsf) __fabsf_vis3 attribute_hidden; +extern __typeof (fabsf) __fabsf_generic attribute_hidden; + +sparc_libm_ifunc (__fabsf, + hwcap & HWCAP_SPARC_VIS3 + ? __fabsf_vis3 + : __fabsf_generic); +libm_alias_float (__fabs, fabs) 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 0000000000..30ee54b0c1 --- /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_fdimf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.c index 081fc15b62..297f5ab730 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.c @@ -1,7 +1,6 @@ /* Compute positive difference, sparc 32-bit+v9+vis3. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2016-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by David S. Miller <davem@davemloft.net>. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -17,16 +16,9 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <sysdep.h> +#include <math.h> -ENTRY(__fdimf_vis3) - movwtos %o0, %f0 - movwtos %o1, %f1 - fcmps %f0, %f1 - fbug 1f - nop - fzeros %f0 - fnegs %f0, %f1 -1: retl - fsubs %f0, %f1, %f0 -END(__fdimf_vis3) +#define __fdim __fdim_vis3 +#define declare_mgen_alias(t, f) + +#include <math/s_fdim.c> diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.S deleted file mode 100644 index 4b13408244..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.S +++ /dev/null @@ -1,19 +0,0 @@ -#include <sparc-ifunc.h> -#include <math_ldbl_opt.h> - -SPARC_ASM_VIS3_IFUNC(fdim) - -weak_alias (__fdim, fdim) - -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __fdim, fdiml, GLIBC_2_1); -#endif - -# undef weak_alias -# define weak_alias(a, b) -# undef compat_symbol -# define compat_symbol(a, b, c, d) - -#define __fdim __fdim_generic - -#include "../s_fdim.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c new file mode 100644 index 0000000000..5b35daee13 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c @@ -0,0 +1,29 @@ +/* Compute positive difference, sparc 32-bit. + Copyright (C) 2016-2018 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <math_ldbl_opt.h> +#include <first-versions.h> +#include <sparc-ifunc.h> +#include <math.h> +#include <libm-alias-double.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); +libm_alias_double (__fdim, fdim) 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 0000000000..17090b54df --- /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_fminf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.c index a71af068cd..84aeba3280 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.c @@ -1,7 +1,6 @@ -/* fminf function, sparc32 vis3 version. - Copyright (C) 2012-2016 Free Software Foundation, Inc. +/* Float compute positive difference, sparc 32-bit+v9+vis3. + Copyright (C) 2016-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by David S. Miller <davem@davemloft.net>, 2012. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -17,12 +16,9 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <sysdep.h> +#include <math.h> -ENTRY (__fminf_vis3) - movwtos %o0, %f0 - movwtos %o1, %f1 - flcmps %fcc1, %f0, %f1 - retl - fmovsge %fcc1, %f1, %f0 -END (__fminf_vis3) +#define __fdimf __fdimf_vis3 +#define declare_mgen_alias(t, f) + +#include <math/s_fdimf.c> diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.S deleted file mode 100644 index 30381d6a59..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.S +++ /dev/null @@ -1,12 +0,0 @@ -#include <sparc-ifunc.h> - -SPARC_ASM_VIS3_IFUNC(fdimf) - -weak_alias (__fdimf, fdimf) - -# undef weak_alias -# define weak_alias(a, b) - -#define __fdimf __fdimf_generic - -#include "../s_fdimf.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.c index 271a7303d1..7fab2a8163 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.c @@ -1,7 +1,6 @@ -/* fmax function, sparc32 vis3 version. - Copyright (C) 2012-2016 Free Software Foundation, Inc. +/* Float compute positive difference, sparc 32-bit. + Copyright (C) 2016-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by David S. Miller <davem@davemloft.net>, 2012. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -17,14 +16,12 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <sysdep.h> +#include <sparc-ifunc.h> +#include <math.h> +#include <libm-alias-float.h> -ENTRY (__fmax_vis3) - movwtos %o0, %f0 - movwtos %o1, %f1 - movwtos %o2, %f2 - movwtos %o3, %f3 - flcmpd %fcc1, %f0, %f2 - retl - fmovdlg %fcc1, %f2, %f0 -END (__fmax_vis3) +extern float __fdimf_vis3 (float, float); +extern float __fdimf_generic (float, float); + +sparc_libm_ifunc(__fdimf, hwcap & HWCAP_SPARC_VIS3 ? __fdimf_vis3 : __fdimf_generic); +libm_alias_float (__fdim, fdim) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis2.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis2.S deleted file mode 100644 index 0180d103b6..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis2.S +++ /dev/null @@ -1,61 +0,0 @@ -/* floor function, sparc32 v9 vis2 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David S. Miller <davem@davemloft.net>, 2013. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <sysdep.h> - - /* 'siam' (Set Interval Arithmetic Mode) is used to quickly override - the rounding mode during this routine. - - We add then subtract (or subtract than add if the initial - value was negative) 2**23 to the value, then subtract it - back out. - - This will clear out the fractional portion of the value and, - with suitable 'siam' initiated rouding mode settings, round - the final result in the proper direction. */ - -#define TWO_FIFTYTWO 0x43300000 /* 2**52 */ - -#define ZERO %f10 /* 0.0 */ -#define SIGN_BIT %f12 /* -0.0 */ - -ENTRY (__floor_vis2) - sethi %hi(TWO_FIFTYTWO), %o2 - sllx %o0, 32, %o0 - or %o0, %o1, %o0 - stx %o0, [%sp + 72] - sllx %o2, 32, %o2 - fzero ZERO - ldd [%sp + 72], %f0 - fnegd ZERO, SIGN_BIT - stx %o2, [%sp + 72] - fabsd %f0, %f14 - ldd [%sp + 72], %f16 - fcmpd %fcc3, %f14, %f16 - fmovduge %fcc3, ZERO, %f16 - fand %f0, SIGN_BIT, SIGN_BIT - for %f16, SIGN_BIT, %f16 - siam (1 << 2) | 3 - faddd %f0, %f16, %f18 - siam (1 << 2) | 0 - fsubd %f18, %f16, %f18 - siam (0 << 2) - retl - for %f18, SIGN_BIT, %f0 -END (__floor_vis2) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis3.S deleted file mode 100644 index 7b91620a42..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis3.S +++ /dev/null @@ -1,62 +0,0 @@ -/* floor function, sparc32 v9 vis3 version. - Copyright (C) 2012-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David S. Miller <davem@davemloft.net>, 2012. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <sysdep.h> - - /* 'siam' (Set Interval Arithmetic Mode) is used to quickly override - the rounding mode during this routine. - - We add then subtract (or subtract than add if the initial - value was negative) 2**23 to the value, then subtract it - back out. - - This will clear out the fractional portion of the value and, - with suitable 'siam' initiated rouding mode settings, round - the final result in the proper direction. - - We also use VIS3 moves to avoid using the stack to transfer - values between float and integer registers. */ - -#define TWO_FIFTYTWO 0x43300000 /* 2**52 */ - -#define ZERO %f10 /* 0.0 */ -#define SIGN_BIT %f12 /* -0.0 */ - -ENTRY (__floor_vis3) - sethi %hi(TWO_FIFTYTWO), %o2 - sllx %o0, 32, %o0 - sllx %o2, 32, %o2 - or %o0, %o1, %o0 - movxtod %o0, %f0 - fzero ZERO - fnegd ZERO, SIGN_BIT - movxtod %o2, %f16 - fabsd %f0, %f14 - fcmpd %fcc3, %f14, %f16 - fmovduge %fcc3, ZERO, %f16 - fand %f0, SIGN_BIT, SIGN_BIT - for %f16, SIGN_BIT, %f16 - siam (1 << 2) | 3 - faddd %f0, %f16, %f18 - siam (1 << 2) | 0 - fsubd %f18, %f16, %f18 - siam (0 << 2) - retl - for %f18, SIGN_BIT, %f0 -END (__floor_vis3) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S deleted file mode 100644 index 1fe4b95ea6..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S +++ /dev/null @@ -1,19 +0,0 @@ -#include <sparc-ifunc.h> -#include <math_ldbl_opt.h> - -SPARC_ASM_VIS3_VIS2_IFUNC(floor) - -weak_alias (__floor, floor) - -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __floor, floorl, GLIBC_2_0) -#endif - -# undef weak_alias -# define weak_alias(a, b) -# undef compat_symbol -# define compat_symbol(a, b, c, d) - -#define __floor __floor_generic - -#include "../s_floor.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis2.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis2.S deleted file mode 100644 index 77e9f4bcc1..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis2.S +++ /dev/null @@ -1,58 +0,0 @@ -/* Float floor function, sparc32 v9 vis2 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David S. Miller <davem@davemloft.net>, 2013. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <sysdep.h> - - /* 'siam' (Set Interval Arithmetic Mode) is used to quickly override - the rounding mode during this routine. - - We add then subtract (or subtract than add if the initial - value was negative) 2**23 to the value, then subtract it - back out. - - This will clear out the fractional portion of the value and, - with suitable 'siam' initiated rouding mode settings, round - the final result in the proper direction. */ - -#define TWO_TWENTYTHREE 0x4b000000 /* 2**23 */ - -#define ZERO %f10 /* 0.0 */ -#define SIGN_BIT %f12 /* -0.0 */ - -ENTRY (__floorf_vis2) - st %o0, [%sp + 68] - sethi %hi(TWO_TWENTYTHREE), %o2 - fzeros ZERO - ld [%sp + 68], %f0 - fnegs ZERO, SIGN_BIT - st %o2, [%sp + 68] - fabss %f0, %f14 - ld [%sp + 68], %f16 - fcmps %fcc3, %f14, %f16 - fmovsuge %fcc3, ZERO, %f16 - fands %f0, SIGN_BIT, SIGN_BIT - fors %f16, SIGN_BIT, %f16 - siam (1 << 2) | 3 - fadds %f0, %f16, %f1 - siam (1 << 2) | 0 - fsubs %f1, %f16, %f1 - siam (0 << 2) - retl - fors %f1, SIGN_BIT, %f0 -END (__floorf_vis2) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis3.S deleted file mode 100644 index bf7da6fbfa..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis3.S +++ /dev/null @@ -1,59 +0,0 @@ -/* Float floor function, sparc32 v9 vis3 version. - Copyright (C) 2012-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David S. Miller <davem@davemloft.net>, 2012. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <sysdep.h> - - /* 'siam' (Set Interval Arithmetic Mode) is used to quickly override - the rounding mode during this routine. - - We add then subtract (or subtract than add if the initial - value was negative) 2**23 to the value, then subtract it - back out. - - This will clear out the fractional portion of the value and, - with suitable 'siam' initiated rouding mode settings, round - the final result in the proper direction. - - We also use VIS3 moves to avoid using the stack to transfer - values between float and integer registers. */ - -#define TWO_TWENTYTHREE 0x4b000000 /* 2**23 */ - -#define ZERO %f10 /* 0.0 */ -#define SIGN_BIT %f12 /* -0.0 */ - -ENTRY (__floorf_vis3) - movwtos %o0, %f0 - sethi %hi(TWO_TWENTYTHREE), %o2 - fzeros ZERO - fnegs ZERO, SIGN_BIT - movwtos %o2, %f16 - fabss %f0, %f14 - fcmps %fcc3, %f14, %f16 - fmovsuge %fcc3, ZERO, %f16 - fands %f0, SIGN_BIT, SIGN_BIT - fors %f16, SIGN_BIT, %f16 - siam (1 << 2) | 3 - fadds %f0, %f16, %f1 - siam (1 << 2) | 0 - fsubs %f1, %f16, %f1 - siam (0 << 2) - retl - fors %f1, SIGN_BIT, %f0 -END (__floorf_vis3) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf.S deleted file mode 100644 index d2a83cb9b8..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf.S +++ /dev/null @@ -1,12 +0,0 @@ -#include <sparc-ifunc.h> - -SPARC_ASM_VIS3_VIS2_IFUNC(floorf) - -weak_alias (__floorf, floorf) - -# undef weak_alias -# define weak_alias(a, b) - -#define __floorf __floorf_generic - -#include "../s_floorf.S" 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 0000000000..e40816facb --- /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-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-vis3.S index 2bf5508858..6c27aefca2 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-vis3.S @@ -1,5 +1,5 @@ /* fma function, sparc32 vis3 version. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c index 3f2f1622c8..804272ff8e 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c @@ -1,14 +1,10 @@ -#ifdef HAVE_AS_VIS3_SUPPORT -# include <sparc-ifunc.h> -# include <math.h> +#include <sparc-ifunc.h> +#include <math.h> +#include <math_ldbl_opt.h> +#include <libm-alias-double.h> extern double __fma_vis3 (double, double, double); extern double __fma_generic (double, double, double); 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> +libm_alias_double (__fma, fma) 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 0000000000..218eeb3115 --- /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-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-vis3.S index 0aca947c25..8aa4b68088 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-vis3.S @@ -1,5 +1,5 @@ /* fmaf function, sparc32 vis3 version. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf.c index 7a273a3b13..e82c4a4031 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf.c +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf.c @@ -1,14 +1,9 @@ -#ifdef HAVE_AS_VIS3_SUPPORT -# include <sparc-ifunc.h> -# include <math.h> +#include <sparc-ifunc.h> +#include <math.h> +#include <libm-alias-float.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> +libm_alias_float (__fma, fma) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S deleted file mode 100644 index e996860485..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S +++ /dev/null @@ -1,19 +0,0 @@ -#include <sparc-ifunc.h> -#include <math_ldbl_opt.h> - -SPARC_ASM_VIS3_IFUNC(fmax) - -weak_alias (__fmax, fmax) - -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __fmax, fmaxl, GLIBC_2_1); -#endif - -# undef weak_alias -# define weak_alias(a, b) -# undef compat_symbol -# define compat_symbol(a, b, c, d) - -#define __fmax __fmax_generic - -#include "../s_fmax.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf.S deleted file mode 100644 index daa91579c4..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf.S +++ /dev/null @@ -1,12 +0,0 @@ -#include <sparc-ifunc.h> - -SPARC_ASM_VIS3_IFUNC(fmaxf) - -weak_alias (__fmaxf, fmaxf) - -# undef weak_alias -# define weak_alias(a, b) - -#define __fmaxf __fmaxf_generic - -#include "../s_fmaxf.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin-vis3.S deleted file mode 100644 index 6d7991cf6e..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin-vis3.S +++ /dev/null @@ -1,30 +0,0 @@ -/* fmin function, sparc32 vis3 version. - Copyright (C) 2012-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David S. Miller <davem@davemloft.net>, 2012. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <sysdep.h> - -ENTRY (__fmin_vis3) - movwtos %o0, %f0 - movwtos %o1, %f1 - movwtos %o2, %f2 - movwtos %o3, %f3 - flcmpd %fcc1, %f0, %f2 - retl - fmovdge %fcc1, %f2, %f0 -END (__fmin_vis3) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S deleted file mode 100644 index b7ea51f475..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S +++ /dev/null @@ -1,19 +0,0 @@ -#include <sparc-ifunc.h> -#include <math_ldbl_opt.h> - -SPARC_ASM_VIS3_IFUNC(fmin) - -weak_alias (__fmin, fmin) - -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __fmin, fminl, GLIBC_2_1); -#endif - -# undef weak_alias -# define weak_alias(a, b) -# undef compat_symbol -# define compat_symbol(a, b, c, d) - -#define __fmin __fmin_generic - -#include "../s_fmin.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf.S deleted file mode 100644 index c4690e1df9..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf.S +++ /dev/null @@ -1,12 +0,0 @@ -#include <sparc-ifunc.h> - -SPARC_ASM_VIS3_IFUNC(fminf) - -weak_alias (__fminf, fminf) - -# undef weak_alias -# define weak_alias(a, b) - -#define __fminf __fminf_generic - -#include "../s_fminf.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint-generic.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint-generic.S new file mode 100644 index 0000000000..1aedc80f4f --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint-generic.S @@ -0,0 +1,5 @@ +#include <libm-alias-double.h> +#define __llrint __llrint_generic +#undef libm_alias_double +#define libm_alias_double(a,b) +#include <sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S> diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint-vis3.S index f070fbcaf3..f3be7b978a 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint-vis3.S @@ -1,5 +1,5 @@ /* llrint(), sparc32 v9 vis3 version. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S deleted file mode 100644 index fd23041404..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S +++ /dev/null @@ -1,24 +0,0 @@ -#include <sparc-ifunc.h> -#include <math_ldbl_opt.h> - -SPARC_ASM_VIS3_IFUNC(llrint) - -weak_alias (__llrint, llrint) - -strong_alias (__llrint, __lllrint) -weak_alias (__lllrint, lllrint) - -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __llrint, llrintl, GLIBC_2_1) -#endif - -# undef weak_alias -# define weak_alias(a, b) -# undef strong_alias -# define strong_alias(a, b) -# undef compat_symbol -# define compat_symbol(a, b, c, d) - -#define __llrint __llrint_generic - -#include "../s_llrint.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.c new file mode 100644 index 0000000000..599a76c59d --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.c @@ -0,0 +1,32 @@ +/* llrint ifunc resolver, Linux/sparc32 version. + Copyright (C) 2017-2018 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#define __llrint __redirect_llrint +#include <math.h> +#undef __llrint +#include <sparc-ifunc.h> +#include <libm-alias-double.h> + +extern __typeof (__redirect_llrint) __llrint_vis3 attribute_hidden; +extern __typeof (__redirect_llrint) __llrint_generic attribute_hidden; + +sparc_libm_ifunc_redirected (__redirect_llrint, __llrint, + hwcap & HWCAP_SPARC_VIS3 + ? __llrint_vis3 + : __llrint_generic); +libm_alias_double (__llrint, llrint) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf-generic.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf-generic.S new file mode 100644 index 0000000000..af4e752be3 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf-generic.S @@ -0,0 +1,5 @@ +#include <libm-alias-float.h> +#define __llrintf __llrintf_generic +#undef libm_alias_float +#define libm_alias_float(a, b) +#include <sysdeps/sparc/sparc32/sparcv9/fpu/s_llrintf.S> diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf-vis3.S index 0cb2eb3f34..f295a19158 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf-vis3.S @@ -1,5 +1,5 @@ /* llrintf(), sparc32 v9 vis3 version. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.S deleted file mode 100644 index 8af5244e7e..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.S +++ /dev/null @@ -1,17 +0,0 @@ -#include <sparc-ifunc.h> - -SPARC_ASM_VIS3_IFUNC(llrintf) - -weak_alias (__llrintf, llrintf) - -strong_alias (__llrintf, __lllrintf) -weak_alias (__lllrintf, lllrintf) - -# undef weak_alias -# define weak_alias(a, b) -# undef strong_alias -# define strong_alias(a, b) - -#define __llrintf __llrintf_generic - -#include "../s_llrintf.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.c new file mode 100644 index 0000000000..46802c22c8 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.c @@ -0,0 +1,30 @@ +/* llrintf ifunc resolver, Linux/sparc32 version. + Copyright (C) 2017-2018 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <math.h> +#include <sparc-ifunc.h> +#include <libm-alias-float.h> + +extern __typeof (llrintf) __llrintf_vis3 attribute_hidden; +extern __typeof (llrintf) __llrintf_generic attribute_hidden; + +sparc_libm_ifunc (__llrintf, + hwcap & HWCAP_SPARC_VIS3 + ? __llrintf_vis3 + : __llrintf_generic); +libm_alias_float (__llrint, llrint) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint-generic.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint-generic.S new file mode 100644 index 0000000000..b869bbb6b9 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint-generic.S @@ -0,0 +1,5 @@ +#include <libm-alias-double.h> +#define __nearbyint __nearbyint_generic +#undef libm_alias_double +#define libm_alias_double(a, b) +#include <sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyint.S> diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint-vis3.S index 4475e8c315..1edeb93d2f 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint-vis3.S @@ -1,7 +1,7 @@ /* Round float to int floating-point values without generating an inexact exception, sparc32 v9 vis3 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2013. @@ -36,14 +36,15 @@ #define SIGN_BIT %f12 /* -0.0 */ ENTRY (__nearbyint_vis3) + sllx %o0, 32, %o0 + or %o0, %o1, %o0 + movxtod %o0, %f0 + fcmpd %fcc3, %f0, %f0 /* Check for sNaN */ st %fsr, [%sp + 88] sethi %hi(TWO_FIFTYTWO), %o2 sethi %hi(0xf8003e0), %o5 ld [%sp + 88], %o4 - sllx %o0, 32, %o0 or %o5, %lo(0xf8003e0), %o5 - or %o0, %o1, %o0 - movxtod %o0, %f0 andn %o4, %o5, %o4 fzero ZERO st %o4, [%sp + 80] diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.S deleted file mode 100644 index 47da9eaafe..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.S +++ /dev/null @@ -1,19 +0,0 @@ -#include <sparc-ifunc.h> -#include <math_ldbl_opt.h> - -SPARC_ASM_VIS3_IFUNC(nearbyint) - -weak_alias (__nearbyint, nearbyint) - -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_1) -#endif - -# undef weak_alias -# define weak_alias(a, b) -# undef compat_symbol -# define compat_symbol(a, b, c, d) - -#define __nearbyint __nearbyint_generic - -#include "../s_nearbyint.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.c new file mode 100644 index 0000000000..3db79bb975 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.c @@ -0,0 +1,32 @@ +/* nearbyint ifunc resolver, Linux/sparc32 version. + Copyright (C) 2017-2018 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#define __nearbyint __redirect_nearbyint +#include <math.h> +#undef __nearbyint +#include <sparc-ifunc.h> +#include <libm-alias-double.h> + +extern __typeof (__redirect_nearbyint) __nearbyint_vis3 attribute_hidden; +extern __typeof (__redirect_nearbyint) __nearbyint_generic attribute_hidden; + +sparc_libm_ifunc_redirected (__redirect_nearbyint, __nearbyint, + hwcap & HWCAP_SPARC_VIS3 + ? __nearbyint_vis3 + : __nearbyint_generic); +libm_alias_double (__nearbyint, nearbyint) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf-generic.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf-generic.S new file mode 100644 index 0000000000..302fb94c80 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf-generic.S @@ -0,0 +1,5 @@ +#include <libm-alias-float.h> +#define __nearbyintf __nearbyintf_generic +#undef libm_alias_float +#define libm_alias_float(a, b) +#include <sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyintf.S> diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf-vis3.S index e39134b686..8ce15647c5 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf-vis3.S @@ -1,7 +1,7 @@ /* Round float to int floating-point values without generating an inexact exception, sparc32 v9 vis3 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2013. @@ -35,8 +35,9 @@ #define SIGN_BIT %f12 /* -0.0 */ ENTRY (__nearbyintf_vis3) - st %fsr, [%sp + 88] movwtos %o0, %f1 + fcmps %fcc3, %f1, %f1 /* Check for sNaN */ + st %fsr, [%sp + 88] sethi %hi(TWO_TWENTYTHREE), %o2 sethi %hi(0xf8003e0), %o5 ld [%sp + 88], %o4 diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf.S deleted file mode 100644 index 95100c1bfc..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf.S +++ /dev/null @@ -1,12 +0,0 @@ -#include <sparc-ifunc.h> - -SPARC_ASM_VIS3_IFUNC(nearbyintf) - -weak_alias (__nearbyintf, nearbyintf) - -# undef weak_alias -# define weak_alias(a, b) - -#define __nearbyintf __nearbyintf_generic - -#include "../s_nearbyintf.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf.c new file mode 100644 index 0000000000..f899932a34 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf.c @@ -0,0 +1,30 @@ +/* nearbyintf ifunc resolver, Linux/sparc32 version. + Copyright (C) 2017-2018 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <math.h> +#include <sparc-ifunc.h> +#include <libm-alias-float.h> + +extern __typeof (nearbyintf) __nearbyintf_vis3 attribute_hidden; +extern __typeof (nearbyintf) __nearbyintf_generic attribute_hidden; + +sparc_libm_ifunc (__nearbyintf, + hwcap & HWCAP_SPARC_VIS3 + ? __nearbyintf_vis3 + : __nearbyintf_generic); +libm_alias_float (__nearbyint, nearbyint) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint-generic.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint-generic.S new file mode 100644 index 0000000000..b122ba2739 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint-generic.S @@ -0,0 +1,5 @@ +#include <libm-alias-double.h> +#define __rint __rint_generic +#undef libm_alias_double +#define libm_alias_double(a, b) +#include <sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S> diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint-vis3.S index 7610f38070..fe70d49f07 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint-vis3.S @@ -1,5 +1,5 @@ /* Round float to int floating-point values, sparc32 v9 vis3 version. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S deleted file mode 100644 index de893faebf..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S +++ /dev/null @@ -1,19 +0,0 @@ -#include <sparc-ifunc.h> -#include <math_ldbl_opt.h> - -SPARC_ASM_VIS3_IFUNC(rint) - -weak_alias (__rint, rint) - -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __rint, rintl, GLIBC_2_0) -#endif - -# undef weak_alias -# define weak_alias(a, b) -# undef compat_symbol -# define compat_symbol(a, b, c, d) - -#define __rint __rint_generic - -#include "../s_rint.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.c new file mode 100644 index 0000000000..bba7228355 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.c @@ -0,0 +1,32 @@ +/* rint ifunc resolver, Linux/sparc32 version. + Copyright (C) 2017-2018 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#define __rint __redirect_rint +#include <math.h> +#undef __rint +#include <sparc-ifunc.h> +#include <libm-alias-double.h> + +extern __typeof (__redirect_rint) __rint_vis3 attribute_hidden; +extern __typeof (__redirect_rint) __rint_generic attribute_hidden; + +sparc_libm_ifunc_redirected (__redirect_rint, __rint, + hwcap & HWCAP_SPARC_VIS3 + ? __rint_vis3 + : __rint_generic); +libm_alias_double (__rint, rint) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf-generic.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf-generic.S new file mode 100644 index 0000000000..dce957aa9b --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf-generic.S @@ -0,0 +1,5 @@ +#include <libm-alias-float.h> +#define __rintf __rintf_generic +#undef libm_alias_float +#define libm_alias_float(a, b) +#include <sysdeps/sparc/sparc32/sparcv9/fpu/s_rintf.S> diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf-vis3.S index 68b4a17ca7..63b9c67846 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf-vis3.S @@ -1,5 +1,5 @@ /* Round float to int floating-point values, sparc32 v9 vis3 version. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.S deleted file mode 100644 index 38fd936086..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.S +++ /dev/null @@ -1,12 +0,0 @@ -#include <sparc-ifunc.h> - -SPARC_ASM_VIS3_IFUNC(rintf) - -weak_alias (__rintf, rintf) - -# undef weak_alias -# define weak_alias(a, b) - -#define __rintf __rintf_generic - -#include "../s_rintf.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.c index 3ee159b306..74c5e25359 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.c @@ -1,7 +1,6 @@ -/* fmaxf function, sparc32 vis3 version. - Copyright (C) 2012-2016 Free Software Foundation, Inc. +/* rintf ifunc resolver, Linux/sparc32 version. + Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by David S. Miller <davem@davemloft.net>, 2012. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -17,12 +16,15 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <sysdep.h> +#include <math.h> +#include <sparc-ifunc.h> +#include <libm-alias-float.h> -ENTRY (__fmaxf_vis3) - movwtos %o0, %f0 - movwtos %o1, %f1 - flcmps %fcc1, %f0, %f1 - retl - fmovslg %fcc1, %f1, %f0 -END (__fmaxf_vis3) +extern __typeof (rintf) __rintf_vis3 attribute_hidden; +extern __typeof (rintf) __rintf_generic attribute_hidden; + +sparc_libm_ifunc (__rintf, + hwcap & HWCAP_SPARC_VIS3 + ? __rintf_vis3 + : __rintf_generic); +libm_alias_float (__rint, rint) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_trunc-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_trunc-vis3.S deleted file mode 100644 index 7f212d927e..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_trunc-vis3.S +++ /dev/null @@ -1,57 +0,0 @@ -/* Truncate argument to nearest integral value not larger than - the argument, sparc32 v9 vis3 version. - - Copyright (C) 2013-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David S. Miller <davem@davemloft.net>, 2013. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <sysdep.h> -#include <math_ldbl_opt.h> - - /* We pop constants into the FPU registers using the incoming - argument stack slots, since this avoid having to use any PIC - references. We also thus avoid having to allocate a register - window. - - VIS instructions are used to facilitate the formation of - easier constants, and the propagation of the sign bit. */ - -#define TWO_FIFTYTWO 0x43300000 /* 2**52 */ - -#define ZERO %f10 /* 0.0 */ -#define SIGN_BIT %f12 /* -0.0 */ - -ENTRY (__trunc_vis3) - sethi %hi(TWO_FIFTYTWO), %o2 - sllx %o0, 32, %o0 - or %o0, %o1, %o0 - fzero ZERO - movxtod %o0, %f0 - sllx %o2, 32, %o2 - fnegd ZERO, SIGN_BIT - movxtod %o2, %f16 - fabsd %f0, %f14 - fcmpd %fcc3, %f14, %f16 - fmovduge %fcc3, ZERO, %f14 - fand %f0, SIGN_BIT, SIGN_BIT - fdtox %f14, %f14 - fxtod %f14, %f14 - faddd %f0, ZERO, %f18 - fmovduge %fcc3, %f18, %f14 - retl - for %f14, SIGN_BIT, %f0 -END (__trunc_vis3) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_trunc.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_trunc.S deleted file mode 100644 index 3787fa1f11..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_trunc.S +++ /dev/null @@ -1,19 +0,0 @@ -#include <sparc-ifunc.h> -#include <math_ldbl_opt.h> - -SPARC_ASM_VIS3_IFUNC(trunc) - -weak_alias (__trunc, trunc) - -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __trunc, truncl, GLIBC_2_1) -#endif - -# undef weak_alias -# define weak_alias(a, b) -# undef compat_symbol -# define compat_symbol(a, b, c, d) - -#define __trunc __trunc_generic - -#include "../s_trunc.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_truncf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_truncf-vis3.S deleted file mode 100644 index 2acd04dae8..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_truncf-vis3.S +++ /dev/null @@ -1,53 +0,0 @@ -/* Truncate argument to nearest integral value not larger than - the argument, sparc32 v9 vis3 version. - - Copyright (C) 2013-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David S. Miller <davem@davemloft.net>, 2013. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <sysdep.h> - - /* We pop constants into the FPU registers using the incoming - argument stack slots, since this avoid having to use any PIC - references. We also thus avoid having to allocate a register - window. - - VIS instructions are used to facilitate the formation of - easier constants, and the propagation of the sign bit. */ - -#define TWO_TWENTYTHREE 0x4b000000 /* 2**23 */ - -#define ZERO %f10 /* 0.0 */ -#define SIGN_BIT %f12 /* -0.0 */ - -ENTRY (__truncf_vis3) - movwtos %o0, %f1 - sethi %hi(TWO_TWENTYTHREE), %o2 - fzeros ZERO - fnegs ZERO, SIGN_BIT - movwtos %o2, %f16 - fabss %f1, %f14 - fcmps %fcc3, %f14, %f16 - fmovsuge %fcc3, ZERO, %f14 - fands %f1, SIGN_BIT, SIGN_BIT - fstoi %f14, %f14 - fitos %f14, %f14 - fadds %f1, ZERO, %f18 - fmovsuge %fcc3, %f18, %f14 - retl - fors %f14, SIGN_BIT, %f0 -END (__truncf_vis3) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_truncf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_truncf.S deleted file mode 100644 index 2ca2517334..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_truncf.S +++ /dev/null @@ -1,12 +0,0 @@ -#include <sparc-ifunc.h> - -SPARC_ASM_VIS3_IFUNC(truncf) - -weak_alias (__truncf, truncf) - -# undef weak_alias -# define weak_alias(a, b) - -#define __truncf __truncf_generic - -#include "../s_truncf.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt.S deleted file mode 100644 index 3b070721d2..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt.S +++ /dev/null @@ -1,12 +0,0 @@ -#include <sparc-ifunc.h> - -SPARC_ASM_VIS3_IFUNC(sqrt) - -weak_alias (__sqrt, sqrt) - -# undef weak_alias -# define weak_alias(a, b) - -#define __sqrt __sqrt_generic - -#include "../w_sqrt.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf-vis3.S deleted file mode 100644 index 7b388833b9..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf-vis3.S +++ /dev/null @@ -1,47 +0,0 @@ -/* sqrtf function. sparc32 v9 vis3 version. - Copyright (C) 2012-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <sysdep.h> - -ENTRY (__sqrtf_vis3) - movwtos %o0, %f0 - fzeros %f8 - fcmps %f0, %f8 - fbl 1f - nop -8: retl - fsqrts %f0, %f0 -1: -#ifdef SHARED - SETUP_PIC_REG_LEAF(o5, g1) - sethi %gdop_hix22(_LIB_VERSION), %g1 - xor %g1, %gdop_lox10(_LIB_VERSION), %g1 - ld [%o5 + %g1], %g1, %gdop(_LIB_VERSION) -#else - sethi %hi(_LIB_VERSION), %g1 - or %g1, %lo(_LIB_VERSION), %g1 -#endif - ld [%g1], %g1 - cmp %g1, -1 - be 8b - mov %o0, %o1 - mov 126, %o2 - mov %o7, %g1 - call __kernel_standard_f - mov %g1, %o7 -END (__sqrtf_vis3) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf.S deleted file mode 100644 index 777a04058c..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf.S +++ /dev/null @@ -1,12 +0,0 @@ -#include <sparc-ifunc.h> - -SPARC_ASM_VIS3_IFUNC(sqrtf) - -weak_alias (__sqrtf, sqrtf) - -# undef weak_alias -# define weak_alias(a, b) - -#define __sqrtf __sqrtf_generic - -#include "../w_sqrtf.S" |