public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix fdim{,f,l} on i386..i586
@ 2004-09-29 13:08 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2004-09-29 13:08 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: Glibc hackers

Hi!

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

	* sysdeps/i386/fpu/s_fdim.S (__fdim): Handle +inf/+inf.
	* sysdeps/i386/fpu/s_fdimf.S (__fdimf): Likewise.
	* sysdeps/i386/fpu/s_fdiml.S (__fdiml): Likewise.

--- libc/sysdeps/i386/fpu/s_fdim.S.jj	2001-07-06 06:55:53.000000000 +0200
+++ libc/sysdeps/i386/fpu/s_fdim.S	2004-09-29 10:05:14.544724188 +0200
@@ -1,5 +1,5 @@
 /* Compute positive difference.
-   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 Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -30,22 +30,23 @@ ENTRY(__fdim)
 	sahf
 	jp	1f
 
-	fsubrp	%st, %st(1)
-	jc	2f
+	jc	3f
 
-	fstp	%st(0)
+	fstp	%st(1)
 	fldz
 	jmp	2f
 
+3:	fsubrp	%st, %st(1)
+	ret
+
 1:	fxam
 	fnstsw
 	andb	$0x45, %ah
 	cmpb	$0x01, %ah
-	je	3f
+	je	2f
 
 	fxch
-3:	fstp	%st(1)
-
-2:	ret
+2:	fstp	%st(1)
+	ret
 END(__fdim)
 weak_alias (__fdim, fdim)
--- libc/sysdeps/i386/fpu/s_fdiml.S.jj	2001-07-06 06:55:53.000000000 +0200
+++ libc/sysdeps/i386/fpu/s_fdiml.S	2004-09-29 10:17:50.603487868 +0200
@@ -1,5 +1,5 @@
 /* Compute positive difference.
-   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 Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -30,22 +30,23 @@ ENTRY(__fdiml)
 	sahf
 	jp	1f
 
-	fsubrp	%st, %st(1)
-	jc	2f
+	jc	3f
 
-	fstp	%st(0)
+	fstp	%st(1)
 	fldz
 	jmp	2f
 
+3:	fsubrp	%st, %st(1)
+	ret
+
 1:	fxam
 	fnstsw
 	andb	$0x45, %ah
 	cmpb	$0x01, %ah
-	je	3f
+	je	2f
 
 	fxch
-3:	fstp	%st(1)
-
-2:	ret
+2:	fstp	%st(1)
+	ret
 END(__fdiml)
 weak_alias (__fdiml, fdiml)
--- libc/sysdeps/i386/fpu/s_fdimf.S.jj	2001-07-06 06:55:53.000000000 +0200
+++ libc/sysdeps/i386/fpu/s_fdimf.S	2004-09-29 10:18:01.789484099 +0200
@@ -1,5 +1,5 @@
 /* Compute positive difference.
-   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 Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -30,22 +30,23 @@ ENTRY(__fdimf)
 	sahf
 	jp	1f
 
-	fsubrp	%st, %st(1)
-	jc	2f
+	jc	3f
 
-	fstp	%st(0)
+	fstp	%st(1)
 	fldz
 	jmp	2f
 
+3:	fsubrp	%st, %st(1)
+	ret
+
 1:	fxam
 	fnstsw
 	andb	$0x45, %ah
 	cmpb	$0x01, %ah
-	je	3f
+	je	2f
 
 	fxch
-3:	fstp	%st(1)
-
-2:	ret
+2:	fstp	%st(1)
+	ret
 END(__fdimf)
 weak_alias (__fdimf, fdimf)

	Jakub

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-09-29 13:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-29 13:08 [PATCH] Fix fdim{,f,l} on i386..i586 Jakub Jelinek

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