aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/sparc/sparc64/fpu/multiarch/Makefile
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2017-10-13 09:56:49 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2017-11-29 16:21:27 -0200
commit1cbd7bfe65e4fafdf77cccccf67950d2b5570d4a (patch)
tree49aca2fc8c969ae0d8ec99e9cd4e8aef44a4eb57 /sysdeps/sparc/sparc64/fpu/multiarch/Makefile
parentaa1142c593447b433208a79bd5a95095cd5dd892 (diff)
downloadglibc-1cbd7bfe65e4fafdf77cccccf67950d2b5570d4a.tar
glibc-1cbd7bfe65e4fafdf77cccccf67950d2b5570d4a.tar.gz
glibc-1cbd7bfe65e4fafdf77cccccf67950d2b5570d4a.tar.bz2
glibc-1cbd7bfe65e4fafdf77cccccf67950d2b5570d4a.zip
sparc: refactor sparc64 signbit{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_signbit{f}-generic.S). It also simplifies the multiarch Makefile by moving the common objects from libm-sysdeps_routines and sysdeps_routines to a new sysdeps_call rule and including it where required with the correct prefix. Checked on sparc64-linux-gnu and sparcv9-linux-gnu. * sysdeps/sparc/sparc-ifunc.h (sparc_libm_ifunc_redirected): New macro. * sysdeps/sparc/sparc64/fpu/multiarch/Makefile (sysdep_calls): New rule. (sysdep_routines): Use sysdep_calls as base. (libm-sysdep_routines): Add generic rule for symbols shared with libc. Add s_signbit-generic and s_signbitf-generic objects. * sysdeps/sparc/sparc64/fpu/multiarch/s_signbit.c: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_signbit-generic.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf-generic.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_signbit.S: Remove file. * sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf.S: Likewise. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/sparc/sparc64/fpu/multiarch/Makefile')
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/Makefile20
1 files changed, 12 insertions, 8 deletions
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/Makefile b/sysdeps/sparc/sparc64/fpu/multiarch/Makefile
index 2ac449672a..702452cbde 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/Makefile
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/Makefile
@@ -1,17 +1,21 @@
ifeq ($(subdir),math)
-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 \
+# 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_signbitf-vis3 s_signbit-vis3 s_signbitf-generic \
+ s_signbit-generic s_finitef-vis3 \
+ s_finite-vis3 s_isinff-vis3 s_isinf-vis3 \
+ s_isnanf-vis3 s_isnan-vis3
+
+sysdep_routines += $(sysdep_calls)
+libm-sysdep_routines += s_lrintf-vis3 s_lrint-vis3 s_rintf-vis3 s_rint-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_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
+ s_trunc-vis3 s_truncf-generic s_trunc-generic \
+ $(sysdep_calls:s_%=m_%)
CFLAGS-s_ceilf-vis3.c += -Wa,-Av9d -mvis3
CFLAGS-s_ceil-vis3.c += -Wa,-Av9d -mvis3