This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
[glibc/tuliom/libmvec] powerpc64: Fix libmvec's logf4 build on GCC < 8
- From: Tulio Magno Quites Machado Filho <tuliom at sourceware dot org>
- To: glibc-cvs at sourceware dot org
- Date: 28 May 2019 18:21:15 -0000
- Subject: [glibc/tuliom/libmvec] powerpc64: Fix libmvec's logf4 build on GCC < 8
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d0758956242c0c5c70ad1912160413152305e1e9
commit d0758956242c0c5c70ad1912160413152305e1e9
Author: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Date: Tue May 28 14:53:39 2019 -0300
powerpc64: Fix libmvec's logf4 build on GCC < 8
The built-in vec_float was added to GCC 8.0, requiring an alternative
implementation when using older GCC versions.
2019-05-28 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
* sysdeps/powerpc/powerpc64/fpu/multiarch/vec_s_logf4_vsx.c:
[!__GNUC_PREREQ (8, 0)] (vec_float): Add an alternative
implementation for GCC < 8.
Diff:
---
sysdeps/powerpc/powerpc64/fpu/multiarch/vec_s_logf4_vsx.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/vec_s_logf4_vsx.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/vec_s_logf4_vsx.c
index 80e5077..6fb4a5d 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/vec_s_logf4_vsx.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/vec_s_logf4_vsx.c
@@ -32,6 +32,17 @@ LOGF_POLY_ORDER = 4. */
#define N (1 << LOGF_TABLE_BITS)
#define OFF 0x3f330000
+/* The vec_float built-in was added to GCC 8. */
+#if !__GNUC_PREREQ (8, 0)
+vector float
+vec_float (vector signed int xb)
+{
+ vector float tmp;
+ __asm__ volatile ("xvcvsxwsp %x0,%x1" : "=wa" (tmp) : "wa" (xb));
+ return tmp;
+}
+#endif
+
vector float
_ZGVbN4v_logf (vector float x)
{