From nobody Wed Feb 11 02:08:40 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; dkim=fail; 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 1526486111657456.6803692391469; Wed, 16 May 2018 08:55:11 -0700 (PDT) Received: from localhost ([::1]:52992 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fIylf-0005W3-JZ for importer@patchew.org; Wed, 16 May 2018 11:55:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fIyjT-0004DR-G3 for qemu-devel@nongnu.org; Wed, 16 May 2018 11:52:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fIyjR-0004z1-3l for qemu-devel@nongnu.org; Wed, 16 May 2018 11:52:51 -0400 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:37526) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fIyjQ-0004yZ-V9 for qemu-devel@nongnu.org; Wed, 16 May 2018 11:52:49 -0400 Received: by mail-pf0-x242.google.com with SMTP id e9-v6so570980pfi.4 for ; Wed, 16 May 2018 08:52:48 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-2-170.tukw.qwest.net. [97.113.2.170]) by smtp.gmail.com with ESMTPSA id c3-v6sm4966632pfn.62.2018.05.16.08.52.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 May 2018 08:52:46 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=jDhX1u7/y5BhcUMp6xkxadIqpIgioPiIemVTRTRzYQI=; b=ADNI65T0aKuwQtlj8bzlSekCiuX+79HeGbZOYfDqL5she3ZwYM+92GDRumRWf5hISH 88zROVImcAP08RyWANytVPctaSyFEBwg/fuD42J92EoQbzzeCC0kvATD35wJfL0teEOo xZ0sj4Lj3fxLs3UbbsExXmZvxFVx4YoO4lq14= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=jDhX1u7/y5BhcUMp6xkxadIqpIgioPiIemVTRTRzYQI=; b=pErn5T7RaGR9Mh4Wu/MRzfcTHbNEA5iYZhmFME9+KvZ1yf03RoO+k9HOwoUVH5tjH/ ZaJ5UMSGuibXkxpeQDx6YSXyw5blFPsbNma8q9lgA7rzqYo4c2PNvJzPkfykmymcaU70 7Qy0N5FZTlk9WSnlLR2PA1Qu0VXCOZxbincvm9smDUw/G8gSWDN9CVPGbxhHfDoOJOQq UhkdURjXBKMoBvYjUun2gVOaMHkg7hMSPTFvuJ/uvF8QRVKBOG6+1O7Yqc2QNO2ZnC+A Yq2JZUCbBRtdNF1WMKsIi/qq2BpQHvI+rXtHLBmILUHGfOocitEJlPkJo71CWxbXojcI ekIQ== X-Gm-Message-State: ALKqPwcrwE3JgYigySO47/nDCM1Ry8Lu9SVsYakuurguHVE5a0VODgea x7W8C5ky/kQ/xxEkjKBkPklwCaxRsS8= X-Google-Smtp-Source: AB8JxZoKpi8aFqyGrft4BY8hhA2ijrNbFvMao1rBbB8XYpI6qEG9FgQZJINZx6rrhmxe5+k5FPTpBQ== X-Received: by 2002:a65:4b8d:: with SMTP id t13-v6mr1163075pgq.53.1526485967571; Wed, 16 May 2018 08:52:47 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 16 May 2018 08:52:16 -0700 Message-Id: <20180516155243.16937-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180516155243.16937-1-richard.henderson@linaro.org> References: <20180516155243.16937-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::242 Subject: [Qemu-devel] [PULL 01/28] fpu/softfloat: Fix conversion from uint64 to float128 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, qemu-stable@nongnu.org, Petr Tesarik Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 From: Petr Tesarik The significand is passed to normalizeRoundAndPackFloat128() as high first, low second. The current code passes the integer first, so the result is incorrectly shifted left by 64 bits. This bug affects the emulation of s390x instruction CXLGBR (convert from logical 64-bit binary-integer operand to extended BFP result). Cc: qemu-stable@nongnu.org Tested-by: Alex Benn=C3=A9e Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Peter Maydell Signed-off-by: Petr Tesarik Message-Id: <20180511071052.1443-1-ptesarik@suse.com> Signed-off-by: Richard Henderson --- fpu/softfloat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fpu/softfloat.c b/fpu/softfloat.c index bc0f52fa54..d07419324a 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -3147,7 +3147,7 @@ float128 uint64_to_float128(uint64_t a, float_status = *status) if (a =3D=3D 0) { return float128_zero; } - return normalizeRoundAndPackFloat128(0, 0x406E, a, 0, status); + return normalizeRoundAndPackFloat128(0, 0x406E, 0, a, status); } =20 =20 --=20 2.17.0