From patchwork Tue Apr 10 12:17:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 133075 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp1238123ljb; Tue, 10 Apr 2018 05:21:18 -0700 (PDT) X-Google-Smtp-Source: AIpwx49pKRBJ42kOAd9WKo6cVGOyG5TwUziQBza3rR3v2Ay2B8qJN+u+pi6JD9O413cg/q3SdqZe X-Received: by 10.55.119.196 with SMTP id s187mr194669qkc.171.1523362878629; Tue, 10 Apr 2018 05:21:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523362878; cv=none; d=google.com; s=arc-20160816; b=p6xlGP92jlW33S/mPJ/VNrkn2a1caEb4ITLweFyFCzgsGt1m9UgWbUS/qOwL4mLmRW 7fgI4rgsEzxDSIWyh5gfUYInTZApzDgv2CM3CxSB2BeFhvgoOISx+zsx5c2cwR+jVrTp FzCqXfxh+5VmMAoMWb9ikut4Q3BR8Sg+n1YgPHSss8w4uuEhGfp3LeIvjimrARSzBOXc M3ODb9lqWQSOAfZ+czAikFnl9jr+aZQn1RsIHoRlJs4rIn/zlqEkVB34gUHDuLqIY+FN B+JRHsD/0Y3za1zizGhs4etu+sbF/GZMNNQc08zuAZQxVqpC3BY4OM2bHe9unPAn5ba9 a5Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:arc-authentication-results; bh=3SifdluTgu3TolKp4klXfO+jcDFX7YqIPxVrtrgjIDQ=; b=EXyxAcgWODG8koBAIfWLwtl+6kWI8mGymVtnl+I/8WMi3XZ7dcMdcFYM7PpKMS7HHS 5mq6Mcot0YZVXkQtezSciWaDA1lJ4K+FOmB+kAgkHSghhMF0bUQcuvM1uv3EOQes6sTf pdQrJqvqIZ+wyfS1LhwBhqw9cHq858OzvNNCNQpOXbOsRcPjuxnl+SoWQARy0JD5y0zW odL4499UWXOcB4LNl2IN0caUjPKDnfpA9F6ISfC95Wg+raBBYr9ee2SvQhkWdoJWgLnl qbpt4ahqXV7s8iToftjVUVBAR8x3tfMmcWEuS+x0vAjrfP19WEyBAs1hf0Hobo4BRUkZ viVQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id d26si3107640qtp.428.2018.04.10.05.21.18 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 10 Apr 2018 05:21:18 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:40591 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5sH0-0002O3-27 for patch@linaro.org; Tue, 10 Apr 2018 08:21:18 -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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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(-) -- 2.16.2 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 = 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); \ } FLOAT_TO_UINT(16, 16)