From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40300) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAdkZ-0006O8-SC for qemu-devel@nongnu.org; Sun, 09 Sep 2012 05:24:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TAdkY-0001IJ-JO for qemu-devel@nongnu.org; Sun, 09 Sep 2012 05:24:19 -0400 Received: from hall.aurel32.net ([88.191.126.93]:37667) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAdkY-0001I2-Cy for qemu-devel@nongnu.org; Sun, 09 Sep 2012 05:24:18 -0400 Date: Sun, 9 Sep 2012 11:24:13 +0200 From: Aurelien Jarno Message-ID: <20120909092413.GQ6791@ohm.aurel32.net> References: <1347138767-19941-1-git-send-email-aurelien@aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH 1/5] softfloat: fix float{32, 64}_muladd options List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Filippov Cc: Peter Maydell , qemu-devel@nongnu.org On Sun, Sep 09, 2012 at 01:40:52AM +0400, Max Filippov wrote: > On Sun, Sep 9, 2012 at 1:12 AM, Aurelien Jarno wrote: > > float{32,64}_muladd takes an enum as a parameter, and not flags. It > > means the parameter should be checked with == test instead of &. > > > > Cc: Peter Maydell > > Signed-off-by: Aurelien Jarno > > --- > > Hi Aurelien, > > I've also stumbled upon this bug, have a patch for it in the xtensa tree. > I guess that the interface was designed to allow combining these flags, why > don't just make them independent: My idea was that negating both the product and c is equivalent to negating the result, so there is no need to allow all of them independent. > diff --git a/fpu/softfloat.h b/fpu/softfloat.h > index feec3a1..2860ca0 100644 > --- a/fpu/softfloat.h > +++ b/fpu/softfloat.h > @@ -219,7 +219,7 @@ void float_raise( int8 flags STATUS_PARAM); > enum { > float_muladd_negate_c = 1, > float_muladd_negate_product = 2, > - float_muladd_negate_result = 3, > + float_muladd_negate_result = 4, > }; > > /*---------------------------------------------------------------------------- That said your solution is also fine, it just allow multiple way to do the same thing. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net