From patchwork Mon Aug 6 01:27:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 143471 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2735600ljj; Sun, 5 Aug 2018 18:27:56 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe4wbjZJajWjvLNQH3R5hETA8anCeK6CcEaDTjRuVy/jaSMF/jR5pzBrZQCGcMjanWXH1zJ X-Received: by 2002:a37:9404:: with SMTP id w4-v6mr11333631qkd.50.1533518876123; Sun, 05 Aug 2018 18:27:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533518876; cv=none; d=google.com; s=arc-20160816; b=lJnWciMWkhmT6sUNfHdGmBrnbWpzv2Oe6hcKC+uKRC5nxGEaB6ErK63qzmhlYJZAVH bFLMYwmZc0kW124d5VvxY+oRvAaIf8wYsrMIbpdUhd9jcD86fFs1MBtKVUUmbknwBvS6 iAF6wP9PkidWL+LahzFClf/fTd/OHj0P31ym+A8Qc2is9NQehaHXsvplBS5LqOBK+vrw YHTHAv6lG/qXIGt8BV77UEPCJwy1mFo2Ry5nlBldQ1nv/t93MYrk4njhuvlWwTuQk729 kOrh9R9E6a080sG9cvughQcBNQuBOGXkaxIHKjc1zZEg8Pusmj8guGn1iC3OkFrz+3Ms WyQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=dRDgR1oHts9XNcSKnMufPVA3dDBR7ZhSRABvbtPaTZA=; b=wUFwEzN9Rz7plPm2S88AWeLzNA5R4Vmewpb7qJNk+wJ/mC9uXrbVce3c2TTx7RRlRe 41sf4AncNEaj2EXads3gLBXVC7JIe3jDfBWTOl3fsHvhdBvJK8WC5OTXuFVK3xiVGHJG Q0mAHMp5tEumIxZbsmREOi+zOFHRdL8958x/Mp1xHAUSB8uflCI/RoCTlZcqLz+YBe8p o3tk3MDy8spPRSVo5Lp3v3jPUWWh/OhYo1oLdFLowl8tsDwYF9Qz4jtpQ5Tego3Kw3pV aM+TKchlxGgrCgE0bi83AP7biIfMi17EaawPsJmiBYb2XECyL8MNXg0fwLLPf1Uhqz5g O2ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=HWYsMFK3; 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 w14-v6si6763159qka.390.2018.08.05.18.27.55 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 05 Aug 2018 18:27:56 -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; dkim=fail header.i=@linaro.org header.s=google header.b=HWYsMFK3; 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]:60273 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fmUJP-0008Sv-Hh for patch@linaro.org; Sun, 05 Aug 2018 21:27:55 -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) 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-Received: by 2002:a17:902:7793:: with SMTP id o19-v6mr12315294pll.306.1533518848940; Sun, 05 Aug 2018 18:27:28 -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) 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" --- target/ppc/fpu_helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.17.1 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 = (uint64_t)extract32(arg, 30, 2) << 62; ret |= ((extract32(arg, 30, 1) ^ 1) * (uint64_t)7) << 59; - ret |= (uint64_t)extract32(arg, 0, 29) << 29; + ret |= (uint64_t)extract32(arg, 0, 30) << 29; } else { /* Zero or Denormalized operand. */ ret = (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 = extract64(arg, 62, 2) << 30; - ret |= extract64(arg, 29, 29); + ret |= 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 = extract64(arg, 63, 1) << 63; + ret = extract64(arg, 63, 1) << 31; if (unlikely(exp >= 874)) { /* Denormal result. */ ret |= ((1ULL << 52) | extract64(arg, 0, 52)) >> (896 + 30 - exp);