about summary refs log tree commit diff
path: root/sysdeps/x86/fpu
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-06-05 03:33:12 +0000
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-06-22 11:09:49 -0300
commitb24381e50f0f8aee1e39bf86ebcbe962b70a9247 (patch)
treebed5a9d7d5047e5cee7bac2094b9e2476ceb1d53 /sysdeps/x86/fpu
parentd19d25dd063af97ff04b2cb1db967a646b150332 (diff)
downloadglibc-b24381e50f0f8aee1e39bf86ebcbe962b70a9247.tar.gz
glibc-b24381e50f0f8aee1e39bf86ebcbe962b70a9247.tar.xz
glibc-b24381e50f0f8aee1e39bf86ebcbe962b70a9247.zip
i386: Use builtin sqrtl
Checked on i686-linux-gnu.
Diffstat (limited to 'sysdeps/x86/fpu')
-rw-r--r--sysdeps/x86/fpu/e_sqrtl.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/sysdeps/x86/fpu/e_sqrtl.c b/sysdeps/x86/fpu/e_sqrtl.c
new file mode 100644
index 0000000000..7ea6f52058
--- /dev/null
+++ b/sysdeps/x86/fpu/e_sqrtl.c
@@ -0,0 +1,27 @@
+/* Square root function.  x86_64 long double version.
+   Copyright (C) 2020 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
+   <https://www.gnu.org/licenses/>.  */
+
+#include <math.h>
+#include <libm-alias-finite.h>
+
+long double
+__ieee754_sqrtl (long double x)
+{
+  return __builtin_sqrtl (x);
+}
+libm_alias_finite (__ieee754_sqrtl, __sqrtl)