diff options
Diffstat (limited to 'sysdeps/sparc')
7 files changed, 73 insertions, 33 deletions
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile index bd8e341010..5b6e2a62e7 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile @@ -9,6 +9,7 @@ sysdep_calls := s_copysignf-vis3 s_copysign-vis3 s_copysignf-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_fmaf-vis3 s_fma-vis3 s_fma-generic s_fmaf-generic \ s_nearbyint-vis3 s_nearbyintf-vis3 \ 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.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S deleted file mode 100644 index 20ae7d0bf6..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S +++ /dev/null @@ -1,18 +0,0 @@ -#include <sparc-ifunc.h> -#include <math_ldbl_opt.h> -#include <libm-alias-double.h> - -SPARC_ASM_VIS3_IFUNC(llrint) - -libm_alias_double (__llrint, llrint) - -# 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..8c92d75651 --- /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 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.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.S deleted file mode 100644 index 4030028c16..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.S +++ /dev/null @@ -1,15 +0,0 @@ -#include <sparc-ifunc.h> -#include <libm-alias-float.h> - -SPARC_ASM_VIS3_IFUNC(llrintf) - -libm_alias_float (__llrint, llrint) - -# 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..30f38eb452 --- /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 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) |