qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/5] softfloat: fix float{32, 64}_muladd options


From: Max Filippov
Subject: Re: [Qemu-devel] [PATCH 1/5] softfloat: fix float{32, 64}_muladd options
Date: Sun, 9 Sep 2012 01:40:52 +0400

On Sun, Sep 9, 2012 at 1:12 AM, Aurelien Jarno <address@hidden> 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 <address@hidden>
> Signed-off-by: Aurelien Jarno <address@hidden>
> ---

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:

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,
 };

 /*----------------------------------------------------------------------------

-- 
Thanks.
-- Max



reply via email to

[Prev in Thread] Current Thread [Next in Thread]