From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18626 invoked by alias); 29 Sep 2004 13:08:09 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 18159 invoked from network); 29 Sep 2004 13:07:59 -0000 Received: from unknown (HELO sunsite.ms.mff.cuni.cz) (195.113.15.26) by sourceware.org with SMTP; 29 Sep 2004 13:07:59 -0000 Received: from sunsite.ms.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8) with ESMTP id i8TD7M3j027026; Wed, 29 Sep 2004 15:07:22 +0200 Received: (from jakub@localhost) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8/Submit) id i8TD7MTI027024; Wed, 29 Sep 2004 15:07:22 +0200 Date: Wed, 29 Sep 2004 13:08:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] Fix fdim{,f,l} on i386..i586 Message-ID: <20040929130722.GU30497@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-SW-Source: 2004-09/txt/msg00111.txt.bz2 Hi! 2004-09-29 Jakub Jelinek * 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 , 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 , 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 , 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