]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
[BZ #15666] alpha: Add __sqrt*_finite definitions
authorRichard Henderson <rth@twiddle.net>
Mon, 24 Jun 2013 16:59:26 +0000 (09:59 -0700)
committerRichard Henderson <rth@twiddle.net>
Tue, 25 Jun 2013 01:12:24 +0000 (18:12 -0700)
With compatibility for ev6 and non-ev6 builds, as the non-ev6 did
manage to get definitions emitted for the float and double functions.

NEWS
ports/ChangeLog.alpha
ports/sysdeps/alpha/Versions
ports/sysdeps/alpha/alphaev6/fpu/e_sqrt.S
ports/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S
ports/sysdeps/alpha/fpu/e_sqrt.c
ports/sysdeps/alpha/fpu/e_sqrtf.c [new file with mode: 0644]
ports/sysdeps/alpha/soft-fp/e_sqrtl.c
ports/sysdeps/unix/sysv/linux/alpha/nptl/libm.abilist

diff --git a/NEWS b/NEWS
index f0ff9759bbc4f136f33fb22f2d3260fa4bfdc53e..4326e018da1da59c07f180371cd09ba741c0d3e5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -21,7 +21,7 @@ Version 2.18
   15406, 15409, 15416, 15418, 15419, 15423, 15424, 15426, 15429, 15431,
   15432, 15441, 15442, 15448, 15465, 15480, 15485, 15488, 15490, 15492,
   15493, 15497, 15506, 15529, 15536, 15553, 15577, 15583, 15618, 15627,
-  15631, 15654, 15655, 15667.
+  15631, 15654, 15655, 15666, 15667.
 
 * CVE-2013-0242 Buffer overrun in regexp matcher has been fixed (Bugzilla
   #15078).
index d2e4813c5869da1de2945b3fec850b6fe88b13db..59e78d1d3bee8bdb95b10dd3660f9b1591ee4ea7 100644 (file)
@@ -1,3 +1,15 @@
+2013-06-24  Richard Henderson  <rth@redhat.com>
+
+       [BZ #15666]
+       * sysdeps/alpha/Versions (GLIBC_2.18): Add __sqrt_finite,
+       __sqrtf_finite, and __sqrtl_finite.
+       * sysdeps/unix/sysv/linux/alpha/nptl/libm.abilist: Likewise.
+       * sysdeps/alpha/alphaev6/fpu/e_sqrt.S: Add __sqrt_finite.
+       * sysdeps/alpha/alphaev6/fpu/e_sqrtf.S: Add __sqrtf_finite.
+       * sysdeps/alpha/fpu/e_sqrt.c: Add __sqrt_finite compatibility.
+       * sysdeps/alpha/fpu/e_sqrtf.c: New file.
+       * sysdeps/alpha/soft-fp/e_sqrtl.c: Add __sqrtl_finite.
+
 2013-06-23  Richard Henderson  <rth@redhat.com>
 
        * sysdeps/alpha/fpu/libm-test-ulps: Update.
index 76b67a6b9084a3d3c2f12aa0ba3e43e14186e35c..ae8fde7b23bf55a8bb79236e89c839e9c0f10858 100644 (file)
@@ -10,4 +10,8 @@ libm {
     # used in inline functions.
     __atan2;
   }
+  GLIBC_2.18 {
+    # forgotten when the symbols were added to glibc 2.15 for other targets
+    __sqrt_finite; __sqrtf_finite; __sqrtl_finite;
+  }
 }
index 66be65e514f94e16712284737fda215f107d251a..2aac3d328017a596c7c727f3312d26d48999e2fe 100644 (file)
@@ -16,6 +16,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
+#include <shlib-compat.h>
 
        .arch ev6
        .set noreorder
@@ -42,3 +43,11 @@ ENTRY(__ieee754_sqrt)
        nop
 
 END(__ieee754_sqrt)
+
+#if SHLIB_COMPAT (libm, GLIBC_2_15, GLIBC_2_18)
+strong_alias(__ieee754_sqrt, __sqrt_finite1)
+compat_symbol(libm, __sqrt_finite1, __sqrt_finite, GLIBC_2_15)
+versioned_symbol(libm, __ieee754_sqrt, __sqrt_finite, GLIBC_2_18)
+#else
+strong_alias(__ieee754_sqrt, __sqrt_finite)
+#endif
index ad89786f25e9c0d624ec18f18a78bb10d3b44c23..5aeafca9adae9f4f42a65d02fe965c8ba9d31edb 100644 (file)
@@ -16,6 +16,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
+#include <shlib-compat.h>
 
        .arch ev6
        .set noreorder
@@ -42,3 +43,11 @@ ENTRY(__ieee754_sqrtf)
        nop
 
 END(__ieee754_sqrtf)
+
+#if SHLIB_COMPAT (libm, GLIBC_2_15, GLIBC_2_18)
+strong_alias(__ieee754_sqrtf, __sqrtf_finite1)
+compat_symbol(libm, __sqrtf_finite1, __sqrtf_finite, GLIBC_2_15)
+versioned_symbol(libm, __ieee754_sqrtf, __sqrtf_finite, GLIBC_2_18)
+#else
+strong_alias(__ieee754_sqrtf, __sqrtf_finite)
+#endif
index 538ff1da624199f683c93d247df5f27330fcfb21..6abca0896ee30e799e03fc7fc38d50b213100605 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <math.h>
 #include <math_private.h>
+#include <shlib-compat.h>
 
 #if !defined(_IEEE_FP_INEXACT)
 
@@ -157,9 +158,30 @@ $fixup:                                                                    \n\
                                                                        \n\
        .end    __ieee754_sqrt");
 
+/* Avoid the __sqrt_finite alias that dbl-64/e_sqrt.c would give...  */
+#undef strong_alias
+#define strong_alias(a,b)
+
+/* ... defining our own.  */
+#if SHLIB_COMPAT (libm, GLIBC_2_15, GLIBC_2_18)
+asm (".global  __sqrt_finite1; __sqrt_finite1 = __ieee754_sqrt");
+#else
+asm (".global  __sqrt_finite; __sqrt_finite = __ieee754_sqrt");
+#endif
+
 static double __full_ieee754_sqrt(double) __attribute_used__;
 #define __ieee754_sqrt __full_ieee754_sqrt
 
+#elif SHLIB_COMPAT (libm, GLIBC_2_15, GLIBC_2_18)
+# define __sqrt_finite __sqrt_finite1
 #endif /* _IEEE_FP_INEXACT */
 
 #include <sysdeps/ieee754/dbl-64/e_sqrt.c>
+
+/* Work around forgotten symbol in alphaev6 build.  */
+#if SHLIB_COMPAT (libm, GLIBC_2_15, GLIBC_2_18)
+# undef __sqrt_finite
+# undef __ieee754_sqrt
+compat_symbol (libm, __sqrt_finite1, __sqrt_finite, GLIBC_2_15);
+versioned_symbol (libm, __ieee754_sqrt, __sqrt_finite, GLIBC_2_18);
+#endif
diff --git a/ports/sysdeps/alpha/fpu/e_sqrtf.c b/ports/sysdeps/alpha/fpu/e_sqrtf.c
new file mode 100644 (file)
index 0000000..ad523f5
--- /dev/null
@@ -0,0 +1,14 @@
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT (libm, GLIBC_2_15, GLIBC_2_18)
+# define __sqrtf_finite __sqrtf_finite1
+#endif
+
+#include <sysdeps/ieee754/flt-32/e_sqrtf.c>
+
+/* Work around forgotten symbol in alphaev6 build.  */
+#if SHLIB_COMPAT (libm, GLIBC_2_15, GLIBC_2_18)
+# undef __sqrtf_finite
+compat_symbol (libm, __sqrtf_finite1, __sqrtf_finite, GLIBC_2_15);
+versioned_symbol (libm, __ieee754_sqrtf, __sqrtf_finite, GLIBC_2_18);
+#endif
index 40e97b88751d9e2b57dad8b1f09f1152a1043561..2cb076e4c6b461b4142585dfdd02175729ac8798 100644 (file)
@@ -21,6 +21,7 @@
 #include <stdlib.h>
 #include <soft-fp.h>
 #include <quad.h>
+#include <shlib-compat.h>
 
 long double
 __ieee754_sqrtl (const long double a)
@@ -37,3 +38,12 @@ __ieee754_sqrtl (const long double a)
   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
index 400a851d4de8d3b1d53bc565bd9a809cc6dbae02..d9b44b531a0e24900727fa8fdd493658e95e3819 100644 (file)
@@ -382,6 +382,8 @@ GLIBC_2.15
  __sinh_finite F
  __sinhf_finite F
  __sinhl_finite F
+ __sqrt_finite F
+ __sqrtf_finite F
  __y0_finite F
  __y0f_finite F
  __y0l_finite F
@@ -396,6 +398,9 @@ GLIBC_2.18
  __issignaling F
  __issignalingf F
  __issignalingl F
+ __sqrt_finite F
+ __sqrtf_finite F
+ __sqrtl_finite F
 GLIBC_2.2
  GLIBC_2.2 A
  feclearexcept F