From nobody Fri Dec 19 04:30:04 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 153442807560551.07895335796047; Thu, 16 Aug 2018 07:01:15 -0700 (PDT) Received: from localhost ([::1]:55802 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fqIpu-00011B-28 for importer@patchew.org; Thu, 16 Aug 2018 10:01:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fqIQp-0000uy-1Y for qemu-devel@nongnu.org; Thu, 16 Aug 2018 09:35:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fqIQn-0002CU-1B for qemu-devel@nongnu.org; Thu, 16 Aug 2018 09:35:18 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:44476) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fqIQm-00027R-Ou for qemu-devel@nongnu.org; Thu, 16 Aug 2018 09:35:16 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1fqIQj-0000C9-EW for qemu-devel@nongnu.org; Thu, 16 Aug 2018 14:35:13 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 16 Aug 2018 14:34:37 +0100 Message-Id: <20180816133438.17061-30-peter.maydell@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180816133438.17061-1-peter.maydell@linaro.org> References: <20180816133438.17061-1-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PULL 29/30] softfloat: Fix missing inexact for floating-point add X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Richard Henderson For 0x1.0000000000003p+0 + 0x1.ffffffep+14 =3D 0x1.0001fffp+15 we dropped the sticky bit and so failed to raise inexact. Reported-by: Laurent Desnogues Signed-off-by: Richard Henderson Reviewed-by: Laurent Desnogues Tested-by: Laurent Desnogues Message-id: 20180810193129.1556-7-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- fpu/softfloat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 8cd24000814..7d63cffdeb8 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -701,7 +701,7 @@ static FloatParts addsub_floats(FloatParts a, FloatPart= s b, bool subtract, } a.frac +=3D b.frac; if (a.frac & DECOMPOSED_OVERFLOW_BIT) { - a.frac >>=3D 1; + shift64RightJamming(a.frac, 1, &a.frac); a.exp +=3D 1; } return a; --=20 2.18.0