From patchwork Thu Oct 20 13:16:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 120812 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 74A34B70DD for ; Fri, 21 Oct 2011 00:27:17 +1100 (EST) Received: from localhost ([::1]:43392 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGseJ-00081f-0r for incoming@patchwork.ozlabs.org; Thu, 20 Oct 2011 09:27:07 -0400 Received: from eggs.gnu.org ([140.186.70.92]:35598) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGsdz-0007Pm-7B for qemu-devel@nongnu.org; Thu, 20 Oct 2011 09:26:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGsdm-0001zn-VE for qemu-devel@nongnu.org; Thu, 20 Oct 2011 09:26:41 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:51802) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGsdm-0001xP-JY for qemu-devel@nongnu.org; Thu, 20 Oct 2011 09:26:34 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1RGsTg-0000hQ-JB; Thu, 20 Oct 2011 14:16:08 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 20 Oct 2011 14:16:02 +0100 Message-Id: <1319116568-2663-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1319116568-2663-1-git-send-email-peter.maydell@linaro.org> References: <1319116568-2663-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 81.2.115.146 Cc: Anthony Liguori Subject: [Qemu-devel] [PATCH 1/7] rsqrte_f32: No need to copy sign bit. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Christophe LYON Indeed, the result is known to be always positive. Signed-off-by: Christophe Lyon Signed-off-by: Peter Maydell --- target-arm/helper.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index e2428eb..17ef98b 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -3039,8 +3039,7 @@ float32 HELPER(rsqrte_f32)(float32 a, CPUState *env) val64 = float64_val(f64); - val = ((val64 >> 63) & 0x80000000) - | ((result_exp & 0xff) << 23) + val = ((result_exp & 0xff) << 23) | ((val64 >> 29) & 0x7fffff); return make_float32(val); }