From patchwork Sun May 15 14:13:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 95624 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 146F7B6F06 for ; Mon, 16 May 2011 00:16:47 +1000 (EST) Received: from localhost ([::1]:46072 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QLc7g-0005Qa-8x for incoming@patchwork.ozlabs.org; Sun, 15 May 2011 10:16:44 -0400 Received: from eggs.gnu.org ([140.186.70.92]:34633) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QLc4Z-00006E-Mc for qemu-devel@nongnu.org; Sun, 15 May 2011 10:13:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QLc4X-0007iK-HB for qemu-devel@nongnu.org; Sun, 15 May 2011 10:13:31 -0400 Received: from hall.aurel32.net ([88.191.126.93]:42086) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QLc4X-0007i4-Ca for qemu-devel@nongnu.org; Sun, 15 May 2011 10:13:29 -0400 Received: from [2001:470:d4ed:0:5e26:aff:fe2b:6f5b] (helo=volta.aurel32.net) by hall.aurel32.net with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1QLc4V-0005wv-VO; Sun, 15 May 2011 16:13:28 +0200 Received: from aurel32 by volta.aurel32.net with local (Exim 4.72) (envelope-from ) id 1QLc4R-00024f-Qc; Sun, 15 May 2011 16:13:23 +0200 From: Aurelien Jarno To: qemu-devel@nongnu.org Date: Sun, 15 May 2011 16:13:16 +0200 Message-Id: <1305468801-6015-7-git-send-email-aurelien@aurel32.net> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1305468801-6015-1-git-send-email-aurelien@aurel32.net> References: <1305468801-6015-1-git-send-email-aurelien@aurel32.net> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 88.191.126.93 Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , Aurelien Jarno Subject: [Qemu-devel] [PATCH 06/11] target-i386: use floatx80 constants in helper_fld*_ST0() 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 Instead of using a table which doesn't correspond to anything from physical in the CPU, use directly the constants in helper_fld*_ST0(). Cc: Andreas Färber Signed-off-by: Aurelien Jarno Reviewed-by: Peter Maydell --- target-i386/op_helper.c | 27 ++++++++------------------- 1 files changed, 8 insertions(+), 19 deletions(-) diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c index 4d309ab..cec0c76 100644 --- a/target-i386/op_helper.c +++ b/target-i386/op_helper.c @@ -99,17 +99,6 @@ static const uint8_t rclb_table[32] = { #define floatx80_l2e make_floatx80( 0x3fff, 0xb8aa3b295c17f0bcLL ) #define floatx80_l2t make_floatx80( 0x4000, 0xd49a784bcd1b8afeLL ) -static const floatx80 f15rk[7] = -{ - floatx80_zero, - floatx80_one, - floatx80_pi, - floatx80_lg2, - floatx80_ln2, - floatx80_l2e, - floatx80_l2t, -}; - /* broken thread support */ static spinlock_t global_cpu_lock = SPIN_LOCK_UNLOCKED; @@ -3816,42 +3805,42 @@ void helper_fabs_ST0(void) void helper_fld1_ST0(void) { - ST0 = f15rk[1]; + ST0 = floatx80_one; } void helper_fldl2t_ST0(void) { - ST0 = f15rk[6]; + ST0 = floatx80_l2t; } void helper_fldl2e_ST0(void) { - ST0 = f15rk[5]; + ST0 = floatx80_l2e; } void helper_fldpi_ST0(void) { - ST0 = f15rk[2]; + ST0 = floatx80_pi; } void helper_fldlg2_ST0(void) { - ST0 = f15rk[3]; + ST0 = floatx80_lg2; } void helper_fldln2_ST0(void) { - ST0 = f15rk[4]; + ST0 = floatx80_ln2; } void helper_fldz_ST0(void) { - ST0 = f15rk[0]; + ST0 = floatx80_zero; } void helper_fldz_FT0(void) { - FT0 = f15rk[0]; + FT0 = floatx80_zero; } uint32_t helper_fnstsw(void)