about summary refs log tree commit diff
path: root/sysdeps/powerpc/fpu/math-use-builtins-sqrt.h
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-06-04 22:47:16 +0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-06-22 11:09:49 -0300
commit169ea8f928fc04a2824f67b2f69b6355a00153b2 (patch)
tree81099aaaddb02672607d2d416cfbac04f081a10d /sysdeps/powerpc/fpu/math-use-builtins-sqrt.h
parenta2e833667d5de877fbc0c5a221a72c68abaa1203 (diff)
downloadglibc-169ea8f928fc04a2824f67b2f69b6355a00153b2.tar.gz
glibc-169ea8f928fc04a2824f67b2f69b6355a00153b2.tar.xz
glibc-169ea8f928fc04a2824f67b2f69b6355a00153b2.zip
powerpc: Use sqrt{f} builtin
The powerpc sqrt implementation is also simplified:

  - the static constants are open coded within the implementation.
  - for !USE_SQRT_BUILTIN the function is implemented directly on
    __ieee754_sqrt (it avoid an superflous extra jump).

Checked on powerpc-linux-gnu and powerpc64le-linux-gnu.
Diffstat (limited to 'sysdeps/powerpc/fpu/math-use-builtins-sqrt.h')
-rw-r--r--sysdeps/powerpc/fpu/math-use-builtins-sqrt.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sysdeps/powerpc/fpu/math-use-builtins-sqrt.h b/sysdeps/powerpc/fpu/math-use-builtins-sqrt.h
new file mode 100644
index 0000000000..653309a7e7
--- /dev/null
+++ b/sysdeps/powerpc/fpu/math-use-builtins-sqrt.h
@@ -0,0 +1,9 @@
+#ifdef _ARCH_PPCSQ
+# define USE_SQRT_BUILTIN 1
+# define USE_SQRTF_BUILTIN 1
+#else
+# define USE_SQRT_BUILTIN 0
+# define USE_SQRTF_BUILTIN 0
+#endif
+#define USE_SQRTL_BUILTIN 0
+#define USE_SQRTF128_BUILTIN 0