summaryrefslogtreecommitdiff
path: root/sysdeps/alpha/e_sqrtl.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2018-05-23 17:29:20 +0000
committerJoseph Myers <joseph@codesourcery.com>2018-05-23 17:29:20 +0000
commit2834fb46109a8a7c9161eb8d0d9ddc707a717144 (patch)
treedb8d39c5ecfb5e3069a4f908299ead60d3befc76 /sysdeps/alpha/e_sqrtl.c
parent7f9f1ecb710eac4d65bb02785ddf288cac098323 (diff)
Remove sysdeps/alpha/soft-fp directory.
As per <https://sourceware.org/ml/libc-alpha/2014-10/msg00369.html>, there should not be separate sysdeps/<arch>/soft-fp directories when those are used by all configurations that use sysdeps/<arch>, and, more generally, should not be sysdeps/foo/Implies files pointing to a subdirectory foo/bar. This patch eliminates the sysdeps/alpha/soft-fp directory accordingly, merging its contents into sysdeps/alpha. Tested with build-many-glibcs.py that installed stripped shared libraries for alpha-linux-gnu are unchanged by this patch. * sysdeps/alpha/Implies: Remove alpha/soft-fp. * sysdeps/alpha/Makefile [$(subdir) = soft-fp] (sysdep_routines): Add functions moved from .... [$(subdir) = math] (CPPFLAGS): Add -I../soft-fp. Moved from .... * sysdeps/alpha/soft-fp/Makefile: ... here. Remove file. * sysdeps/alpha/Versions (libc): Add GLIBC_2.3.4 symbols moved from .... * sysdeps/alpha/soft-fp/Versions: ... here. Remove file. * sysdeps/alpha/soft-fp/e_sqrtl.c: Move to .... * sysdeps/alpha/e_sqrtl.c: ... here. * sysdeps/alpha/soft-fp/local-soft-fp.h: Move to .... * sysdeps/alpha/local-soft-fp.h: ... here. * sysdeps/alpha/soft-fp/ots_add.c: Move to .... * sysdeps/alpha/ots_add.c: ... here. * sysdeps/alpha/soft-fp/ots_cmp.c: Move to .... * sysdeps/alpha/ots_cmp.c: ... here. * sysdeps/alpha/soft-fp/ots_cmpe.c: Move to .... * sysdeps/alpha/ots_cmpe.c: ... here. * sysdeps/alpha/soft-fp/ots_cvtqux.c: Move to .... * sysdeps/alpha/ots_cvtqux.c: ... here. * sysdeps/alpha/soft-fp/ots_cvtqx.c: Move to .... * sysdeps/alpha/ots_cvtqx.c: ... here. * sysdeps/alpha/soft-fp/ots_cvttx.c: Move to .... * sysdeps/alpha/ots_cvttx.c: ... here. * sysdeps/alpha/soft-fp/ots_cvtxq.c: Move to .... * sysdeps/alpha/ots_cvtxq.c: ... here. * sysdeps/alpha/soft-fp/ots_cvtxt.c: Move to .... * sysdeps/alpha/ots_cvtxt.c: ... here. * sysdeps/alpha/soft-fp/ots_div.c: Move to .... * sysdeps/alpha/ots_div.c: ... here. * sysdeps/alpha/soft-fp/ots_mul.c: Move to .... * sysdeps/alpha/ots_mul.c: ... here. * sysdeps/alpha/soft-fp/ots_nintxq.c: Move to .... * sysdeps/alpha/ots_nintxq.c: ... here. * sysdeps/alpha/soft-fp/ots_sub.c: Move to .... * sysdeps/alpha/ots_sub.c: ... here. * sysdeps/alpha/soft-fp/sfp-machine.h: Move to .... * sysdeps/alpha/sfp-machine.h: ... here.
Diffstat (limited to 'sysdeps/alpha/e_sqrtl.c')
-rw-r--r--sysdeps/alpha/e_sqrtl.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/sysdeps/alpha/e_sqrtl.c b/sysdeps/alpha/e_sqrtl.c
new file mode 100644
index 0000000000..689681adfc
--- /dev/null
+++ b/sysdeps/alpha/e_sqrtl.c
@@ -0,0 +1,49 @@
+/* long double square root in software floating-point emulation.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
+
+ 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 <stdlib.h>
+#include <soft-fp.h>
+#include <quad.h>
+#include <shlib-compat.h>
+
+long double
+__ieee754_sqrtl (const long double a)
+{
+ FP_DECL_EX;
+ FP_DECL_Q(A); FP_DECL_Q(C);
+ long double c;
+ long _round = 4; /* dynamic rounding */
+
+ FP_INIT_ROUNDMODE;
+ FP_UNPACK_Q(A, a);
+ FP_SQRT_Q(C, A);
+ FP_PACK_Q(c, C);
+ FP_HANDLE_EXCEPTIONS;
+ return c;
+}
+
+/* ??? We forgot to add this symbol in 2.15. Getting this into 2.18 isn't as
+ straight-forward as just adding the alias, since a generic Versions file
+ includes the 2.15 version and the linker uses the first one it sees. */
+#if SHLIB_COMPAT (libm, GLIBC_2_15, GLIBC_2_18)
+versioned_symbol (libm, __ieee754_sqrtl, __sqrtl_finite, GLIBC_2_18);
+#else
+strong_alias(__ieee754_sqrtl, __sqrtl_finite)
+#endif