mirror of git://sourceware.org/git/glibc.git
sparc: refactor sparc64 isinf{f} selector to C
This patch refactors the sparc64 ifunc selector to a C implementation.
Also, the generic symbol is moved to its own implementation file
s_isinf{f}-generic.S).
Checked on sparc64-linux-gnu and sparcv9-linux-gnu.
* sysdeps/sparc/sparc64/fpu/multiarch/Makefile (sysdeps_calls):
Add isinff-generic and s_isinf-generic objects.
* sysdeps/sparc/sparc64/fpu/multiarch/s_isinf-generic.S: New file.
* sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.c: Likewise.
* sysdeps/sparc/sparc64/fpu/multiarch/s_isinff-generic.S: Likewise.
* sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.c: Likewise.
* sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.S: Remove file.
* sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.S: Likewise.
Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
parent
c6862a2371
commit
c96d3335a3
|
|
@ -1,5 +1,14 @@
|
||||||
2017-11-29 Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
2017-11-29 Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||||
|
|
||||||
|
* sysdeps/sparc/sparc64/fpu/multiarch/Makefile (sysdeps_calls):
|
||||||
|
Add s_isinff-generic and s_isinf-generic objects.
|
||||||
|
* sysdeps/sparc/sparc64/fpu/multiarch/s_isinf-generic.S: New file.
|
||||||
|
* sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.c: Likewise.
|
||||||
|
* sysdeps/sparc/sparc64/fpu/multiarch/s_isinff-generic.S: Likewise.
|
||||||
|
* sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.c: Likewise.
|
||||||
|
* sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.S: Remove file.
|
||||||
|
* sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.S: Likewise.
|
||||||
|
|
||||||
* sysdeps/sparc/sparc64/fpu/multiarch/Makefile (sysdeps_calls):
|
* sysdeps/sparc/sparc64/fpu/multiarch/Makefile (sysdeps_calls):
|
||||||
Add s_isnanf-generic and s_isnan-generic objects.
|
Add s_isnanf-generic and s_isnan-generic objects.
|
||||||
* sysdeps/sparc/sparc64/fpu/multiarch/s_isnan-generic.S: New file.
|
* sysdeps/sparc/sparc64/fpu/multiarch/s_isnan-generic.S: New file.
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ ifeq ($(subdir),math)
|
||||||
# by printf. While the libc objects have the prefix s_, the libm ones are
|
# by printf. While the libc objects have the prefix s_, the libm ones are
|
||||||
# prefixed with m_.
|
# prefixed with m_.
|
||||||
sysdep_calls := s_signbitf-vis3 s_signbit-vis3 s_signbitf-generic \
|
sysdep_calls := s_signbitf-vis3 s_signbit-vis3 s_signbitf-generic \
|
||||||
s_signbit-generic s_finitef-vis3 \
|
s_signbit-generic s_finitef-vis3 s_finite-vis3 \
|
||||||
s_finite-vis3 s_isinff-vis3 s_isinf-vis3 \
|
s_isinff-vis3 s_isinf-vis3 s_isinff-generic s_isinf-generic \
|
||||||
s_isnanf-vis3 s_isnan-vis3 s_isnanf-generic s_isnan-generic
|
s_isnanf-vis3 s_isnan-vis3 s_isnanf-generic s_isnan-generic
|
||||||
|
|
||||||
sysdep_routines += $(sysdep_calls)
|
sysdep_routines += $(sysdep_calls)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
#define __isinf __isinf_generic
|
||||||
|
#undef hidden_def
|
||||||
|
#define hidden_def(a)
|
||||||
|
#undef weak_alias
|
||||||
|
#define weak_alias(a,b)
|
||||||
|
#include <./sysdeps/sparc/sparc64/fpu/s_isinf.S>
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
#include <sparc-ifunc.h>
|
|
||||||
|
|
||||||
SPARC_ASM_VIS3_IFUNC(isinf)
|
|
||||||
|
|
||||||
hidden_def (__isinf)
|
|
||||||
weak_alias (__isinf, isinf)
|
|
||||||
|
|
||||||
# undef weak_alias
|
|
||||||
# define weak_alias(a, b)
|
|
||||||
# undef hidden_def
|
|
||||||
# define hidden_def(a)
|
|
||||||
|
|
||||||
#define __isinf __isinf_generic
|
|
||||||
|
|
||||||
#include "../s_isinf.S"
|
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
/* isinf ifunc resolver, Linux/sparc64 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 __isinf __redirect___isinf
|
||||||
|
#define __isinff __redirect___isinff
|
||||||
|
#define __isinfl __redirect___isinfl
|
||||||
|
#include <math.h>
|
||||||
|
#undef __isinf
|
||||||
|
#undef __isinff
|
||||||
|
#undef __isinfl
|
||||||
|
#include <sparc-ifunc.h>
|
||||||
|
|
||||||
|
extern __typeof (isinf) __isinf_vis3 attribute_hidden;
|
||||||
|
extern __typeof (isinf) __isinf_generic attribute_hidden;
|
||||||
|
|
||||||
|
sparc_libm_ifunc_redirected (__redirect___isinf, __isinf,
|
||||||
|
hwcap & HWCAP_SPARC_VIS3
|
||||||
|
? __isinf_vis3
|
||||||
|
: __isinf_generic)
|
||||||
|
|
||||||
|
sparc_ifunc_redirected_hidden_def (__redirect___isinf, __isinf)
|
||||||
|
weak_alias (__isinf, isinf)
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
#define __isinff __isinff_generic
|
||||||
|
#undef hidden_def
|
||||||
|
#define hidden_def(a)
|
||||||
|
#undef weak_alias
|
||||||
|
#define weak_alias(a,b)
|
||||||
|
#include <sysdeps/sparc/sparc64/fpu/s_isinff.S>
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
#include <sparc-ifunc.h>
|
|
||||||
|
|
||||||
SPARC_ASM_VIS3_IFUNC(isinff)
|
|
||||||
|
|
||||||
hidden_def (__isinff)
|
|
||||||
weak_alias (__isinff, isinff)
|
|
||||||
|
|
||||||
# undef weak_alias
|
|
||||||
# define weak_alias(a, b)
|
|
||||||
# undef hidden_def
|
|
||||||
# define hidden_def(a)
|
|
||||||
|
|
||||||
#define __isinff __isinff_generic
|
|
||||||
|
|
||||||
#include "../s_isinff.S"
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
/* isinff ifunc resolver, Linux/sparc64 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 __isinff __redirect___isinff
|
||||||
|
#include <math.h>
|
||||||
|
#undef __isinff
|
||||||
|
#include <sparc-ifunc.h>
|
||||||
|
|
||||||
|
extern __typeof (isinff) __isinff_vis3 attribute_hidden;
|
||||||
|
extern __typeof (isinff) __isinff_generic attribute_hidden;
|
||||||
|
|
||||||
|
sparc_libm_ifunc_redirected (__redirect___isinff, __isinff,
|
||||||
|
hwcap & HWCAP_SPARC_VIS3
|
||||||
|
? __isinff_vis3
|
||||||
|
: __isinff_generic);
|
||||||
|
|
||||||
|
sparc_ifunc_redirected_hidden_def (__redirect___isinff, __isinff)
|
||||||
|
weak_alias (__isinff, isinff)
|
||||||
Loading…
Reference in New Issue