aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2019-03-08 20:26:00 +0000
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2019-06-12 14:32:39 -0300
commit6427a6ac8cfe6c6e64214db606c5dced67213e8d (patch)
treeb8b52b884fe5960a75100042fa076f47e0df114a /sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c
parenta8c590f7896ab661df873e64ad0cbb559d399dbf (diff)
downloadglibc-6427a6ac8cfe6c6e64214db606c5dced67213e8d.zip
glibc-6427a6ac8cfe6c6e64214db606c5dced67213e8d.tar.gz
glibc-6427a6ac8cfe6c6e64214db606c5dced67213e8d.tar.bz2
powerpc: Remove optimized isinf
The powerpc isinf optimizations onyl adds complexity: - GCC will call libm iff -fsignaling-nans is used. This usage pattern is usually not performance oriented and for such calls PLT overhead should dominate execution time. - The power7 uses ftdiv to optimize for some input pattern and branch implementation for INF and denormal that does: return (ix & UINT64_C (0x7fffffffffffffff)) == UINT64_C (0x7ff0000000000000) Although it does show slight better latency than generic algorithm (as below), it is only for power7 and requires it to override it for power8. - The power8 implementation is just the generic implementation using ISA 2.07 mfvsrd instruction (which GCC uses for generic implementation). So generic implementation is the best option for powerpc64le. Checked on powerpc-linux-gnu (built without --with-cpu, with --with-cpu=power4 and with --with-cpu=power5+ and --disable-multi-arch), powerpc64-linux-gnu (built without --with-cp and with --with-cpu=power5+ and --disable-multi-arch). * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile (sysdeps_routines, libm-sysdep_routines): Remove s_isinf* and s_isinf* objects. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinf-power7.S: Remove file. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinf-ppc32.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinf.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinff-ppc32.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinff.c: Likewise. * sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S: Likewise. * sysdeps/powerpc/powerpc32/power7/fpu/s_isinff.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile (sysdep_call): Remove s_isinf* and s_isinf* objects. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-power7.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-power8.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinff-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinff.c: Likewise. * sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S: Likewise. * sysdeps/powerpc/powerpc64/power7/fpu/s_isinff.S: Likewise. * sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S: Likewise. * sysdeps/powerpc/powerpc64/power8/fpu/s_isinff.S: Likewise. Reviewed-by: Gabriel F. T. Gomes <gabrielftg@linux.ibm.com>
Diffstat (limited to 'sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c')
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c62
1 files changed, 0 insertions, 62 deletions
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c
deleted file mode 100644
index f5b9044..0000000
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Multiple versions of isinf.
- Copyright (C) 2013-2019 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
-
-/* The following definitions, although not related to the 'double'
- version of 'isinf', are required to guarantee macro expansions
- (e.g.: from __isinff to __redirect_isinff) in include/math.h, thus
- compensating for the unintended macro expansions in
- math/bits/mathcalls-helper-functions.h. */
-#define __isinff __redirect___isinff
-#define __isinfl __redirect___isinfl
-#define __isinff128 __redirect___isinff128
-
-#include <math.h>
-#include <math_ldbl_opt.h>
-#include <shlib-compat.h>
-#include "init-arch.h"
-
-extern __typeof (__isinf) __isinf_ppc64 attribute_hidden;
-extern __typeof (__isinf) __isinf_power7 attribute_hidden;
-extern __typeof (__isinf) __isinf_power8 attribute_hidden;
-#undef __isinf
-#undef __isinff
-#undef __isinfl
-#undef __isinff128
-
-libc_ifunc_redirected (__redirect___isinf, __isinf,
- (hwcap2 & PPC_FEATURE2_ARCH_2_07)
- ? __isinf_power8
- : (hwcap & PPC_FEATURE_ARCH_2_06)
- ? __isinf_power7
- : __isinf_ppc64);
-
-weak_alias (__isinf, isinf)
-
-#ifdef NO_LONG_DOUBLE
-strong_alias (__isinf, __isinfl)
-weak_alias (__isinf, isinfl)
-#endif
-
-#if !IS_IN (libm)
-# if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
-compat_symbol (libc, __isinf, __isinfl, GLIBC_2_0);
-compat_symbol (libc, isinf, isinfl, GLIBC_2_0);
-# endif
-#endif