public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Richard Henderson <rth@twiddle.net>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: Re: [alpha] math routine improvements
Date: Sun, 18 Mar 2007 19:02:00 -0000	[thread overview]
Message-ID: <20070318190641.GU1826@sunsite.mff.cuni.cz> (raw)
In-Reply-To: <20070314174806.GA13985@twiddle.net>

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

      reply	other threads:[~2007-03-18 19:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-14 17:48 Richard Henderson
2007-03-18 19:02 ` Jakub Jelinek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070318190641.GU1826@sunsite.mff.cuni.cz \
    --to=jakub@redhat.com \
    --cc=libc-hacker@sources.redhat.com \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).