This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: PowerPC: libm ABI update
- From: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Fri, 18 May 2012 10:36:10 -0300
- Subject: Re: PATCH: PowerPC: libm ABI update
- References: <4FB55FBD.1070302@linux.vnet.ibm.com> <m2zk96pgtl.fsf@igel.home>
On 05/17/2012 07:45 PM, Andreas Schwab wrote:
> __copysignl isn't an exported symbol.
> __logbl isn't an exported symbol.
Fixed.
> Pedantically, __finitel was added to libm in GLIBC_2.1 (though it
> doesn't make a difference here, since ppc64 has a GLIBC_2.3 baseline).
>
> Andreas.
I based on the modification on PPC32 ABI first and based on your comment
I kept the same code as before.
Ok to commit?
--
2012-05-18 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
* sysdeps/powerpc/powerpc32/power6/fpu/s_copysign.S: Add compat symbol
copysignl for GLIBC_2_0.
* sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S: Add compat symbol
finitel for GLIBC_2.0 and __finitel for GLIBC_2_1.
* sysdeps/powerpc/powerpc32/power7/fpu/s_logb.c: Add compat symbol
logbl for GLIBC_2_0.
* sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S: Likewise.
* sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S: Likewise.
diff --git a/sysdeps/powerpc/powerpc32/power6/fpu/s_copysign.S b/sysdeps/powerpc/powerpc32/power6/fpu/s_copysign.S
index beb5bae..e147ba7 100644
--- a/sysdeps/powerpc/powerpc32/power6/fpu/s_copysign.S
+++ b/sysdeps/powerpc/powerpc32/power6/fpu/s_copysign.S
@@ -47,9 +47,12 @@ strong_alias (__copysign, __copysignl)
weak_alias (__copysign, copysignl)
#endif
-#ifndef IS_IN_libm
-# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
-compat_symbol (libc, __copysign, __copysignl, GLIBC_2_0);
+#ifdef IS_IN_libm
+# if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
+compat_symbol (libm, copysign, copysignl, GLIBC_2_0)
+# endif
+#else
+# if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
compat_symbol (libc, copysign, copysignl, GLIBC_2_0);
# endif
#endif
diff --git a/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S b/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S
index 7640d3c..106cf54 100644
--- a/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S
+++ b/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S
@@ -79,8 +79,15 @@ strong_alias (__finite, __finitel)
weak_alias (__finite, finitel)
#endif
-#ifndef IS_IN_libm
-# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+#ifdef IS_IN_libm
+# if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
+compat_symbol (libm, finite, finitel, GLIBC_2_0)
+# endif
+# if LONG_DOUBLE_COMPAT (libm, GLIBC_2_1)
+compat_symbol (libm, __finite, __finitel, GLIBC_2_1)
+# endif
+#else
+# if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
compat_symbol (libc, __finite, __finitel, GLIBC_2_0);
compat_symbol (libc, finite, finitel, GLIBC_2_0);
# endif
diff --git a/sysdeps/powerpc/powerpc32/power7/fpu/s_logb.c b/sysdeps/powerpc/powerpc32/power7/fpu/s_logb.c
index 71ee148..fba4822 100644
--- a/sysdeps/powerpc/powerpc32/power7/fpu/s_logb.c
+++ b/sysdeps/powerpc/powerpc32/power7/fpu/s_logb.c
@@ -16,7 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include "math_private.h"
+#include <math_ldbl_opt.h>
/* This implementation avoids FP to INT conversions by using VSX
bitwise instructions over FP values. */
@@ -66,10 +66,12 @@ __logb (double x)
/* Test to avoid logb_downward (0.0) == -0.0. */
return ret == -0.0 ? 0.0 : ret;
}
-
weak_alias (__logb, logb)
-
#ifdef NO_LONG_DOUBLE
strong_alias (__logb, __logbl)
weak_alias (__logb, logbl)
#endif
+
+#if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
+compat_symbol (libm, logb, logbl, GLIBC_2_0);
+#endif
diff --git a/sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S b/sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S
index 0765d8a..b632773 100644
--- a/sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S
+++ b/sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S
@@ -47,9 +47,12 @@ strong_alias (__copysign, __copysignl)
weak_alias (__copysign, copysignl)
#endif
-#ifndef IS_IN_libm
+#ifdef IS_IN_libm
+# if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
+compat_symbol (libm, copysign, copysignl, GLIBC_2_0)
+# endif
+#else
# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
-compat_symbol (libc, __copysign, __copysignl, GLIBC_2_0);
compat_symbol (libc, copysign, copysignl, GLIBC_2_0);
# endif
#endif
diff --git a/sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S b/sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S
index 319d07f..7ab2948 100644
--- a/sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S
+++ b/sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S
@@ -59,8 +59,13 @@ strong_alias (__finite, __finitef)
hidden_def (__finitef)
weak_alias (__finitef, finitef)
-#ifndef IS_IN_libm
-# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+#ifdef IS_IN_libm
+# if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
+compat_symbol (libm, __finite, __finitel, GLIBC_2_0)
+compat_symbol (libm, finite, finitel, GLIBC_2_0)
+# endif
+#else
+# if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
compat_symbol (libc, __finite, __finitel, GLIBC_2_0);
compat_symbol (libc, finite, finitel, GLIBC_2_0);
# endif
--
1.6.0.2
--
Adhemerval Zanella Netto
Software Engineer
Linux Technology Center Brazil
Toolchain / GLIBC on Power Architecture
azanella@linux.vnet.ibm.com / azanella@br.ibm.com
+55 61 8642-9890