From nobody Wed Nov 5 07:32:46 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; 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 1533518967795953.9186168420089; Sun, 5 Aug 2018 18:29:27 -0700 (PDT) Received: from localhost ([::1]:60276 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fmUKn-0000vf-UJ for importer@patchew.org; Sun, 05 Aug 2018 21:29:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fmUJ1-0008QU-7M for qemu-devel@nongnu.org; Sun, 05 Aug 2018 21:27:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fmUJ0-0001Gm-Dh for qemu-devel@nongnu.org; Sun, 05 Aug 2018 21:27:31 -0400 Received: from mail-pl0-x232.google.com ([2607:f8b0:400e:c01::232]:44517) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fmUJ0-0001GQ-7Z for qemu-devel@nongnu.org; Sun, 05 Aug 2018 21:27:30 -0400 Received: by mail-pl0-x232.google.com with SMTP id ba4-v6so4909042plb.11 for ; Sun, 05 Aug 2018 18:27:30 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-8-179.tukw.qwest.net. [97.113.8.179]) by smtp.gmail.com with ESMTPSA id h130-v6sm33622091pgc.88.2018.08.05.18.27.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 Aug 2018 18:27:27 -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; bh=dRDgR1oHts9XNcSKnMufPVA3dDBR7ZhSRABvbtPaTZA=; b=HWYsMFK3LOsZ0+a7up29NEWVmUKHy9BhUYq29op+AbGuE2lcfdUoC2jeeTcghZN+UG vZYBKarvodyHq9RieuwHyb4mawfjr3GiUOFT/XUr8pB7L6ZACpgRHU+emaVbyqtIHqRo vGrtNNWJBLy67pmT4QcROkdjMeyoSpncX2XxQ= 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; bh=dRDgR1oHts9XNcSKnMufPVA3dDBR7ZhSRABvbtPaTZA=; b=DCyOwCco7FEjmVXn3wRiS3plYTppyMWYtkCI7d1l5hy74rVEngHXXA5tZ7nMUlau5J QXCF+OOpU31aIrar7rGgcQUB4ugNos0HJhVhA1zx8auVuesPhSTqzYLHLsxOwh8T3avm lAdYppmQh7+3k8K39LnlyQfNt81MguegeSI4hyMQL6tVwbOwv6KYteCDogra+m2gLSRZ Mm0INLKhmLtbreLO1nGHEcyOLGaVgubhGJ4fzb+jrMusdy6KwNIHd3Ke/gkqRHDCIVmH FsWN0XtCyPfFxRHWZRgu1gh3ONBxDcd1iPP3IXprFpPrXaJHEv3A1ScmE3fijkjbtWIm LMsg== X-Gm-Message-State: AOUpUlGh31VekbUGGHRjx4NltEIVwHT2CyFyYrFX70Iv+Sjg4iyA/e77 Hp00YHo9Ksk/ljRJbqxm+EZJuZZ7WzQ= X-Google-Smtp-Source: AAOMgpdPNt/lS0KiUwC2py5vWU8MCf+J1YmeUAfwgRLipSy2IK3AuyEd1dgfCiIv47eV3uwluqN6uw== X-Received: by 2002:a17:902:7793:: with SMTP id o19-v6mr12315294pll.306.1533518848940; Sun, 05 Aug 2018 18:27:28 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 5 Aug 2018 18:27:23 -0700 Message-Id: <20180806012723.5639-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180806012723.5639-1-richard.henderson@linaro.org> References: <20180806012723.5639-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::232 Subject: [Qemu-devel] [PATCH 2/2] fixup! target/ppc: Use non-arithmetic conversions for fp load/store 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: mark.cave-ayland@ilande.co.uk, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" --- target/ppc/fpu_helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/ppc/fpu_helper.c b/target/ppc/fpu_helper.c index faea64020b..b9bb1b856e 100644 --- a/target/ppc/fpu_helper.c +++ b/target/ppc/fpu_helper.c @@ -61,7 +61,7 @@ uint64_t helper_todouble(uint32_t arg) /* Normalized operand, or Inf, or NaN. */ ret =3D (uint64_t)extract32(arg, 30, 2) << 62; ret |=3D ((extract32(arg, 30, 1) ^ 1) * (uint64_t)7) << 59; - ret |=3D (uint64_t)extract32(arg, 0, 29) << 29; + ret |=3D (uint64_t)extract32(arg, 0, 30) << 29; } else { /* Zero or Denormalized operand. */ ret =3D (uint64_t)extract32(arg, 31, 1) << 63; @@ -88,14 +88,14 @@ uint32_t helper_tosingle(uint64_t arg) if (likely(exp > 896)) { /* No denormalization required (includes Inf, NaN). */ ret =3D extract64(arg, 62, 2) << 30; - ret |=3D extract64(arg, 29, 29); + ret |=3D extract64(arg, 29, 30); } else { /* Zero or Denormal result. If the exponent is in bounds for * a single-precision denormal result, extract the proper bits. * If the input is not zero, and the exponent is out of bounds, * then the result is undefined; this underflows to zero. */ - ret =3D extract64(arg, 63, 1) << 63; + ret =3D extract64(arg, 63, 1) << 31; if (unlikely(exp >=3D 874)) { /* Denormal result. */ ret |=3D ((1ULL << 52) | extract64(arg, 0, 52)) >> (896 + 30 -= exp); --=20 2.17.1