]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
powerpc64: Fix libmvec's logf4 build on GCC < 8
authorTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Tue, 28 May 2019 17:53:39 +0000 (14:53 -0300)
committerTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Wed, 19 Feb 2020 20:29:00 +0000 (17:29 -0300)
The built-in vec_float was added to GCC 8.0, requiring an alternative
implementation when using older GCC versions.

sysdeps/powerpc/powerpc64/fpu/multiarch/vec_s_logf4_vsx.c

index 80e507773d3464eb5eb53040904f545771db88ea..6fb4a5dd78fb0ecf014a1f95f397ca08892b20fa 100644 (file)
@@ -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)
 {