From nobody Sun Feb 8 23:00:56 2026 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 1523362985106590.4646715332725; Tue, 10 Apr 2018 05:23:05 -0700 (PDT) Received: from localhost ([::1]:40599 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5sIe-0003ly-0t for importer@patchew.org; Tue, 10 Apr 2018 08:23:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5sDR-0007uj-G1 for qemu-devel@nongnu.org; Tue, 10 Apr 2018 08:17:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5sDQ-0000jA-Lz for qemu-devel@nongnu.org; Tue, 10 Apr 2018 08:17:37 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:40762) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f5sDQ-0000iH-Ej for qemu-devel@nongnu.org; Tue, 10 Apr 2018 08:17:36 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1f5sDP-0007eE-Bu for qemu-devel@nongnu.org; Tue, 10 Apr 2018 13:17:35 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 13:17:24 +0100 Message-Id: <20180410121724.8549-13-peter.maydell@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410121724.8549-1-peter.maydell@linaro.org> References: <20180410121724.8549-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 12/12] fpu: Fix rounding mode for floatN_to_uintM_round_to_zero 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: 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 We incorrectly passed in the current rounding mode instead of float_round_to_zero. Signed-off-by: Richard Henderson Message-id: 20180410055912.934-1-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- fpu/softfloat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 6e16284e66..b46dccc63e 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -1486,8 +1486,8 @@ uint ## isz ## _t float ## fsz ## _to_uint ## isz ## = _round_to_zero \ (float ## fsz a, float_status *s) \ { \ FloatParts p =3D float ## fsz ## _unpack_canonical(a, s); \ - return round_to_uint_and_pack(p, s->float_rounding_mode, \ - UINT ## isz ## _MAX, s); \ + return round_to_uint_and_pack(p, float_round_to_zero, \ + UINT ## isz ## _MAX, s); \ } =20 FLOAT_TO_UINT(16, 16) --=20 2.16.2