From patchwork Tue Apr 10 05:59:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 896496 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="FIT3yhki"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40KxSj33Dkz9s0n for ; Tue, 10 Apr 2018 16:04:05 +1000 (AEST) Received: from localhost ([::1]:43255 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5mNv-0007Js-JG for incoming@patchwork.ozlabs.org; Tue, 10 Apr 2018 02:04:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5mJO-00046Q-Ls for qemu-devel@nongnu.org; Tue, 10 Apr 2018 01:59:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5mJN-0006J9-Ub for qemu-devel@nongnu.org; Tue, 10 Apr 2018 01:59:22 -0400 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]:44248) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5mJN-0006Ip-Bc for qemu-devel@nongnu.org; Tue, 10 Apr 2018 01:59:21 -0400 Received: by mail-pf0-x244.google.com with SMTP id p15so7356372pff.11 for ; Mon, 09 Apr 2018 22:59:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=he9pdVOOrteuumoCmEdl9gz0XvbrbXL5or6RGSfJLh0=; b=FIT3yhkiF9rf7kHJKM7NV4cXcdjuF+QpwL3PB29RgZNC5ai61D3PCB8kKS+ezaMxYQ 0FCldJA+zvJoTyVk9sl9kicCeSBjDjVksd2v97W6JeKu9Z3/fQErVatVpL4/Lqt5ftbQ qUo7bW8QvaQnNCOAqvrEy1Rakxej0w9CwtBec= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=he9pdVOOrteuumoCmEdl9gz0XvbrbXL5or6RGSfJLh0=; b=rglB2O+9Z7xRSP/W2HfYARwIKdy7oJWOpSekzXNhhFXS+PneaNzeVfic+u0/twwDjg 08+lWH4v1odXRKUxYvJXuVXFRwJWl7sQ6vk3xdZzYGm356wG/xac197xnQILyu9w/0aN 5hGdj8Aud1KLDjerivNZtPXoDV7tLslczIs1nKp2E4XhtgN6fPt/btNh0PtIsls/qKGo 6FoK/xqLc296CKXuNapbdDJzV3LJuvdaCmVQp9jFCYw2DRFQzKrafe1i+pR4cf35JMON xprWiCAL90FQwbA2kl+CtEcHPT858iPZgHVwKceQ+gnEwURkAcl1OS9+KtNHBqcHkVtl TaYQ== X-Gm-Message-State: AElRT7GeijDKxoV86ZV7+n4gAFKlCrXJkb/+H7EZVgpha3htBgt3udXe reyFXrCEJ9d9N0j0upRDBZ6UtiXP6V4= X-Google-Smtp-Source: AIpwx4+ZD/jTJLD2B99nso6cUHzN5qu7vcSAjySYb7wPWKLpntSQ5Al9+6JNIUkYcc16OJ+dVL1ZaA== X-Received: by 10.99.56.8 with SMTP id f8mr27345854pga.374.1523339959819; Mon, 09 Apr 2018 22:59:19 -0700 (PDT) Received: from cloudburst.twiddle.net ([2001:8000:10e0:a000:c673:a6b6:fdef:1933]) by smtp.gmail.com with ESMTPSA id r11sm3986282pfg.0.2018.04.09.22.59.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Apr 2018 22:59:18 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 15:59:12 +1000 Message-Id: <20180410055912.934-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.14.3 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::244 Subject: [Qemu-devel] [PATCH for-2.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: , Cc: peter.maydell@linaro.org, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" We incorrectly passed in the current rounding mode instead of float_round_to_zero. Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée --- Found while runnning SVE RISU tests; it should be visible with the right set of inputs to AdvSIMD RISU tests. r~ --- 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 = 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)