public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix [BZ #139]
@ 2004-04-29  7:38 Jakub Jelinek
       [not found] ` <4090FF37.11B1A8A1@megsinet.net>
  0 siblings, 1 reply; 3+ messages in thread
From: Jakub Jelinek @ 2004-04-29  7:38 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: Glibc hackers, Dan Kegel, M.H.VanLeeuwen

Hi!

The extra checks I've added to binutils prevent this from assembling
(before it has been silently using %f29 instead of %f60).

2004-04-29  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c (_Qp_qtoi): Use %f31
	for single precision register, add it to __asm clobbers [BZ #139].

--- libc/sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c.jj	2001-07-06 06:56:05.000000000 +0200
+++ libc/sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c	2004-04-29 09:22:20.847934043 +0200
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return (int)(*a)
-   Copyright (C) 1997,1999 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
@@ -38,9 +38,9 @@ int _Qp_qtoi(const long double *a)
   	__asm (
 "	ldd [%1], %%f52\n"
 "	ldd [%1+8], %%f54\n"
-"	fqtoi %%f52, %%f60\n"
-"	st %%f60, [%0]\n"
-"	" : : "r" (&rx), "r" (a) : QP_CLOBBER);
+"	fqtoi %%f52, %%f31\n"
+"	st %%f31, [%0]\n"
+"	" : : "r" (&rx), "r" (a) : QP_CLOBBER, "f31");
 	r = rx);
 
   return r;

	Jakub

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] Fix [BZ #139] (followup)
       [not found] ` <4090FF37.11B1A8A1@megsinet.net>
@ 2004-04-29 17:34   ` Jakub Jelinek
  2004-04-29 20:02     ` Roland McGrath
  0 siblings, 1 reply; 3+ messages in thread
From: Jakub Jelinek @ 2004-04-29 17:34 UTC (permalink / raw)
  To: Ulrich Drepper, M.H.VanLeeuwen; +Cc: Glibc hackers

On Thu, Apr 29, 2004 at 08:12:23AM -0500, M.H.VanLeeuwen wrote:
> Jakub,
> 
> Could you also check qp_qtoui.c
...
> What about qp_qtoux.c
...
> And qp_qtox.c

Obviously you're right.  This patch is needed in addition to the previous
one.

2004-04-29  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c (_Qp_qtoui): Use %f31
	for single precision register, add it to __asm clobbers.
	* sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c (_Qp_qtoux): Use fqtox
	instead of fqtoi in QP_HANDLE_EXCEPTIONS.
	* sysdeps/sparc/sparc64/soft-fp/qp_qtox.c (_Qp_qtox): Likewise.
	Reported by M. H. VanLeeuwen <vanl@megsinet.net>.

--- libc/sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c.jj	2001-07-06 06:56:05.000000000 +0200
+++ libc/sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c	2004-04-29 15:15:11.942798201 +0200
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return (unsigned int)(*a)
-   Copyright (C) 1997,1999 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
@@ -38,9 +38,9 @@ unsigned int _Qp_qtoui(const long double
   	__asm (
 "	ldd [%1], %%f52\n"
 "	ldd [%1+8], %%f54\n"
-"	fqtoi %%f52, %%f60\n"
-"	st %%f60, [%0]\n"
-"	" : : "r" (&rx), "r" (a) : QP_CLOBBER);
+"	fqtoi %%f52, %%f31\n"
+"	st %%f31, [%0]\n"
+"	" : : "r" (&rx), "r" (a) : QP_CLOBBER, "f31");
 	r = rx);
 
   return r;
--- libc/sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c.jj	2001-07-06 06:56:05.000000000 +0200
+++ libc/sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c	2004-04-29 15:16:37.753419820 +0200
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return (unsigned long)(*a)
-   Copyright (C) 1997,1999 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
@@ -38,7 +38,7 @@ unsigned long _Qp_qtoux(const long doubl
   	__asm (
 "	ldd [%1], %%f52\n"
 "	ldd [%1+8], %%f54\n"
-"	fqtoi %%f52, %%f60\n"
+"	fqtox %%f52, %%f60\n"
 "	std %%f60, [%0]\n"
 "	" : : "r" (&rx), "r" (a) : QP_CLOBBER);
 	r = rx);
--- libc/sysdeps/sparc/sparc64/soft-fp/qp_qtox.c.jj	2001-07-06 06:56:05.000000000 +0200
+++ libc/sysdeps/sparc/sparc64/soft-fp/qp_qtox.c	2004-04-29 15:16:57.549872038 +0200
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return (long)(*a)
-   Copyright (C) 1997,1999 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
@@ -38,7 +38,7 @@ long _Qp_qtox(const long double *a)
   	__asm (
 "	ldd [%1], %%f52\n"
 "	ldd [%1+8], %%f54\n"
-"	fqtoi %%f52, %%f60\n"
+"	fqtox %%f52, %%f60\n"
 "	std %%f60, [%0]\n"
 "	" : : "r" (&rx), "r" (a) : QP_CLOBBER);
 	r = rx);


	Jakub

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix [BZ #139] (followup)
  2004-04-29 17:34   ` [PATCH] Fix [BZ #139] (followup) Jakub Jelinek
@ 2004-04-29 20:02     ` Roland McGrath
  0 siblings, 0 replies; 3+ messages in thread
From: Roland McGrath @ 2004-04-29 20:02 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Ulrich Drepper, M.H.VanLeeuwen, Glibc hackers

I put both patches in.


Thanks,
Roland

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-04-29 20:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-29  7:38 [PATCH] Fix [BZ #139] Jakub Jelinek
     [not found] ` <4090FF37.11B1A8A1@megsinet.net>
2004-04-29 17:34   ` [PATCH] Fix [BZ #139] (followup) Jakub Jelinek
2004-04-29 20:02     ` Roland McGrath

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).