From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCU5U-0003u7-AJ for qemu-devel@nongnu.org; Wed, 20 Apr 2011 05:52:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCU5S-0001MO-Ne for qemu-devel@nongnu.org; Wed, 20 Apr 2011 05:52:44 -0400 Received: from hall.aurel32.net ([88.191.126.93]:41593) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCU5S-0001MH-GX for qemu-devel@nongnu.org; Wed, 20 Apr 2011 05:52:42 -0400 Date: Wed, 20 Apr 2011 11:37:55 +0200 From: Aurelien Jarno Message-ID: <20110420093755.GG6388@volta.aurel32.net> References: <1303160412-8107-1-git-send-email-aurelien@aurel32.net> <1303160412-8107-14-git-send-email-aurelien@aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Subject: Re: [Qemu-devel] [PATCH 13/20] target-i386: fix helper_fdiv() wrt softfloat List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org On Tue, Apr 19, 2011 at 06:11:37PM +0100, Peter Maydell wrote: > On 18 April 2011 22:00, Aurelien Jarno wrote: > > +++ b/target-i386/op_helper.c > > @@ -3440,9 +3440,10 @@ static void fpu_set_exception(int mask) > > > >  static inline CPU86_LDouble helper_fdiv(CPU86_LDouble a, CPU86_LDouble b) > >  { > > -    if (b == 0.0) > > +    if (floatx_is_zero(b)) { > >         fpu_set_exception(FPUS_ZE); > > -    return a / b; > > +    } > > +    return floatx_div(a, b, &env->fp_status); > >  } > > When we get rid of softfloat-native we should be able to just > use softfloat's flag-raising code and get rid of this special > case of zero, right? Yes, this is already in my next series adding exception support. > Reviewed-by: Peter Maydell > > -- PMM > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net