qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/5] softfloat: fix float{32, 64}_muladd options
@ 2012-09-08 21:12 Aurelien Jarno
  2012-09-08 21:12 ` [Qemu-devel] [PATCH 2/5] target-ppc: simplify NaN propagation for vector functions Aurelien Jarno
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Aurelien Jarno @ 2012-09-08 21:12 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Aurelien Jarno

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 <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
 fpu/softfloat.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/fpu/softfloat.c b/fpu/softfloat.c
index b29256a..518e45b 100644
--- a/fpu/softfloat.c
+++ b/fpu/softfloat.c
@@ -2171,15 +2171,15 @@ float32 float32_muladd(float32 a, float32 b, float32 c, int flags STATUS_PARAM)
         return float32_default_nan;
     }
 
-    if (flags & float_muladd_negate_c) {
+    if (flags == float_muladd_negate_c) {
         cSign ^= 1;
     }
 
-    signflip = (flags & float_muladd_negate_result) ? 1 : 0;
+    signflip = (flags == float_muladd_negate_result) ? 1 : 0;
 
     /* Work out the sign and type of the product */
     pSign = aSign ^ bSign;
-    if (flags & float_muladd_negate_product) {
+    if (flags == float_muladd_negate_product) {
         pSign ^= 1;
     }
     pInf = (aExp == 0xff) || (bExp == 0xff);
@@ -3724,15 +3724,15 @@ float64 float64_muladd(float64 a, float64 b, float64 c, int flags STATUS_PARAM)
         return float64_default_nan;
     }
 
-    if (flags & float_muladd_negate_c) {
+    if (flags == float_muladd_negate_c) {
         cSign ^= 1;
     }
 
-    signflip = (flags & float_muladd_negate_result) ? 1 : 0;
+    signflip = (flags == float_muladd_negate_result) ? 1 : 0;
 
     /* Work out the sign and type of the product */
     pSign = aSign ^ bSign;
-    if (flags & float_muladd_negate_product) {
+    if (flags == float_muladd_negate_product) {
         pSign ^= 1;
     }
     pInf = (aExp == 0x7ff) || (bExp == 0x7ff);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-09-09 10:25 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-08 21:12 [Qemu-devel] [PATCH 1/5] softfloat: fix float{32, 64}_muladd options Aurelien Jarno
2012-09-08 21:12 ` [Qemu-devel] [PATCH 2/5] target-ppc: simplify NaN propagation for vector functions Aurelien Jarno
2012-09-08 21:12 ` [Qemu-devel] [PATCH 3/5] target-ppc: use the softfloat min/max functions Aurelien Jarno
2012-09-08 21:12 ` [Qemu-devel] [PATCH 4/5] target-ppc: use the softfloat float32_muladd function Aurelien Jarno
2012-09-09  9:51   ` Peter Maydell
2012-09-09 10:03     ` Aurelien Jarno
2012-09-08 21:12 ` [Qemu-devel] [PATCH 5/5] target-ppc: get rid of the HANDLE_NAN{1, 2, 3} macros Aurelien Jarno
2012-09-08 22:40   ` Peter Maydell
2012-09-08 21:40 ` [Qemu-devel] [PATCH 1/5] softfloat: fix float{32, 64}_muladd options Max Filippov
2012-09-08 22:29   ` Peter Maydell
2012-09-09  9:24   ` Aurelien Jarno
2012-09-09  9:47     ` Peter Maydell
2012-09-09 10:04       ` Aurelien Jarno
2012-09-09 10:25     ` Peter Maydell

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 NNTP newsgroup(s).