From patchwork Sat Sep 8 21:12:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 182596 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id ACAB32C0086 for ; Sun, 9 Sep 2012 07:14:03 +1000 (EST) Received: from localhost ([::1]:40326 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TASLp-0004bw-NJ for incoming@patchwork.ozlabs.org; Sat, 08 Sep 2012 17:14:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47151) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TASL6-0002iV-Ht for qemu-devel@nongnu.org; Sat, 08 Sep 2012 17:13:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TASL4-0002EZ-FT for qemu-devel@nongnu.org; Sat, 08 Sep 2012 17:13:16 -0400 Received: from hall.aurel32.net ([88.191.126.93]:46522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TASL4-0002EA-9G for qemu-devel@nongnu.org; Sat, 08 Sep 2012 17:13:14 -0400 Received: from [188.85.229.73] (helo=ohm.aurel32.net) by hall.aurel32.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1TASL2-0002dt-3k; Sat, 08 Sep 2012 23:13:12 +0200 Received: from aurel32 by ohm.aurel32.net with local (Exim 4.80) (envelope-from ) id 1TASKz-0005Eh-Tz; Sat, 08 Sep 2012 23:13:09 +0200 From: Aurelien Jarno To: qemu-devel@nongnu.org Date: Sat, 8 Sep 2012 23:12:43 +0200 Message-Id: <1347138767-19941-1-git-send-email-aurelien@aurel32.net> X-Mailer: git-send-email 1.7.10.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 88.191.126.93 Cc: Peter Maydell , Aurelien Jarno Subject: [Qemu-devel] [PATCH 1/5] softfloat: fix float{32, 64}_muladd options X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- 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);