This is the mail archive of the libc-hacker@sourceware.org mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [alpha] math routine improvements


On Wed, Mar 14, 2007 at 10:48:06AM -0700, Richard Henderson wrote:
> Branchless versions of some existing rounding routines.
> Implement some easy functions that were missing.
> Remove inline versions of fdim, because they handle inf incorrectly.

Have you checked libc.so/libm.so ABI before/after the patch
(I'm using:
    for i in `find . -name '*.so*' -a -type f`; do
      readelf -Ws $i \
          | sed -n '/\.symtab/,$d;/ UND /d;/@GLIBC_PRIVATE/d;/\(GLOBAL\|WEAK\)/p' \
          | awk '{ if ($4 == "OBJECT") { printf "%s %s %s %s %s\n", $8, $4, $5, $6, $3 } else { printf "%s %s %s %s\n", $8, $4, $5, $6 }}' \
          | LC_ALL=C sort -u > ~/xxabilist/$1-$2-$3/$b/`echo $i | sed 's|^\./||;s|/|.|g'`.abi
    done
and then diff the files)?

>From a quick glance at the new files and math/Versions and/or
sysdeps/ldbl-opt/ compat_symbol versions I'd say following is needed,
but it is untested.

2007-03-18  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/alpha/fpu/s_nearbyint.c (nearbyintl): Fix version on
	compat_symbol to GLIBC_2_1.
	* sysdeps/alpha/fpu/s_fmin.S (fminl): Likewise.
	* sysdeps/alpha/fpu/s_trunc.c (truncl): Likewise.
	* sysdeps/alpha/fpu/s_fmax.S (fmaxl): Likewise.
	* sysdeps/alpha/fpu/s_lrint.c (lrintl, llrintl): Likewise.
	* sysdeps/alpha/fpu/s_lround.c (lroundl, llroundl): Likewise.
	* sysdeps/alpha/fpu/s_round.c (roundl): Likewise.
	* sysdeps/alpha/fpu/s_isnan.c (isnanl): Provide compat_symbol in
	libc, not libm.
	(__isnanl): New compat_symbol.

--- libc/sysdeps/alpha/fpu/s_nearbyint.c.jj	2007-03-14 18:44:14.000000000 +0100
+++ libc/sysdeps/alpha/fpu/s_nearbyint.c	2007-03-18 19:25:04.000000000 +0100
@@ -43,6 +43,6 @@ weak_alias (__nearbyint, nearbyint)
 strong_alias (__nearbyint, __nearbyintl)
 weak_alias (__nearbyint, nearbyintl)
 #endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_0);
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_1);
 #endif
--- libc/sysdeps/alpha/fpu/s_isnan.c.jj	2007-03-14 18:44:14.000000000 +0100
+++ libc/sysdeps/alpha/fpu/s_isnan.c	2007-03-18 19:27:46.000000000 +0100
@@ -53,6 +53,9 @@ weak_alias (__isnanf, isnanf)
 strong_alias (__isnan, __isnanl)
 weak_alias (__isnan, isnanl)
 #endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __isnan, isnanl, GLIBC_2_0);
+#ifndef IS_IN_libm
+# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
+compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
+# endif
 #endif
--- libc/sysdeps/alpha/fpu/s_fmin.S.jj	2007-03-14 18:44:14.000000000 +0100
+++ libc/sysdeps/alpha/fpu/s_fmin.S	2007-03-18 19:28:09.000000000 +0100
@@ -53,6 +53,6 @@ weak_alias (__fmin, fmin)
 strong_alias (__fmin, __fminl)
 weak_alias (__fminl, fminl)
 #endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __fmin, fminl, GLIBC_2_0);
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __fmin, fminl, GLIBC_2_1);
 #endif
--- libc/sysdeps/alpha/fpu/s_trunc.c.jj	2007-03-14 21:01:05.000000000 +0100
+++ libc/sysdeps/alpha/fpu/s_trunc.c	2007-03-18 19:24:22.000000000 +0100
@@ -48,6 +48,6 @@ weak_alias (__trunc, trunc)
 strong_alias (__trunc, __truncl)
 weak_alias (__trunc, truncl)
 #endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __trunc, truncl, GLIBC_2_0);
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __trunc, truncl, GLIBC_2_1);
 #endif
--- libc/sysdeps/alpha/fpu/s_fmax.S.jj	2007-03-14 18:44:14.000000000 +0100
+++ libc/sysdeps/alpha/fpu/s_fmax.S	2007-03-18 19:28:20.000000000 +0100
@@ -53,6 +53,6 @@ weak_alias (__fmax, fmax)
 strong_alias (__fmax, __fmaxl)
 weak_alias (__fmaxl, fmaxl)
 #endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __fmax, fmaxl, GLIBC_2_0);
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __fmax, fmaxl, GLIBC_2_1);
 #endif
--- libc/sysdeps/alpha/fpu/s_lrint.c.jj	2007-03-14 18:44:14.000000000 +0100
+++ libc/sysdeps/alpha/fpu/s_lrint.c	2007-03-18 19:26:07.000000000 +0100
@@ -42,7 +42,7 @@ strong_alias (__lrint, __llrintl)
 weak_alias (__lrintl, lrintl)
 weak_alias (__llrintl, llrintl)
 #endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __lrint, lrintl, GLIBC_2_0);
-compat_symbol (libm, __llrint, llrintl, GLIBC_2_0);
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __lrint, lrintl, GLIBC_2_1);
+compat_symbol (libm, __llrint, llrintl, GLIBC_2_1);
 #endif
--- libc/sysdeps/alpha/fpu/s_lround.c.jj	2007-03-14 21:01:05.000000000 +0100
+++ libc/sysdeps/alpha/fpu/s_lround.c	2007-03-18 19:25:43.000000000 +0100
@@ -42,7 +42,7 @@ strong_alias (__lround, __llroundl)
 weak_alias (__lroundl, lroundl)
 weak_alias (__llroundl, llroundl)
 #endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __lround, lroundl, GLIBC_2_0);
-compat_symbol (libm, __llround, llroundl, GLIBC_2_0);
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __lround, lroundl, GLIBC_2_1);
+compat_symbol (libm, __llround, llroundl, GLIBC_2_1);
 #endif
--- libc/sysdeps/alpha/fpu/s_round.c.jj	2007-03-14 21:01:05.000000000 +0100
+++ libc/sysdeps/alpha/fpu/s_round.c	2007-03-18 19:24:40.000000000 +0100
@@ -44,6 +44,6 @@ weak_alias (__round, round)
 strong_alias (__round, __roundl)
 weak_alias (__roundl, roundl)
 #endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __round, roundl, GLIBC_2_0);
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __round, roundl, GLIBC_2_1);
 #endif


	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]