From patchwork Tue Jan 4 15:15:44 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 77495 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C442AB70E3 for ; Wed, 5 Jan 2011 02:21:33 +1100 (EST) Received: from localhost ([127.0.0.1]:49457 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pa8hW-0004j5-NU for incoming@patchwork.ozlabs.org; Tue, 04 Jan 2011 10:21:30 -0500 Received: from [140.186.70.92] (port=41170 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pa8cM-00029a-6d for qemu-devel@nongnu.org; Tue, 04 Jan 2011 10:16:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pa8cH-0004vQ-J3 for qemu-devel@nongnu.org; Tue, 04 Jan 2011 10:16:10 -0500 Received: from hall.aurel32.net ([88.191.126.93]:37445) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pa8cH-0004ug-EP for qemu-devel@nongnu.org; Tue, 04 Jan 2011 10:16:05 -0500 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.69) (envelope-from ) id 1Pa8c9-0004NT-70; Tue, 04 Jan 2011 16:15:57 +0100 Received: from aurel32 by volta.aurel32.net with local (Exim 4.72) (envelope-from ) id 1Pa8c7-0002Fr-7C; Tue, 04 Jan 2011 16:15:55 +0100 From: Aurelien Jarno To: qemu-devel@nongnu.org Date: Tue, 4 Jan 2011 16:15:44 +0100 Message-Id: <1294154150-7528-3-git-send-email-aurelien@aurel32.net> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1294154150-7528-1-git-send-email-aurelien@aurel32.net> References: <1294154150-7528-1-git-send-email-aurelien@aurel32.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: Aurelien Jarno Subject: [Qemu-devel] [PATCH v2 2/8] softfloat: use bits32 instead of uint32 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Use bits32 instead of uint32 when manipulating floating point values directly for consistency reasons. Signed-off-by: Aurelien Jarno --- fpu/softfloat-native.c | 4 ++-- fpu/softfloat-specialize.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fpu/softfloat-native.c b/fpu/softfloat-native.c index 008bb53..5c737b7 100644 --- a/fpu/softfloat-native.c +++ b/fpu/softfloat-native.c @@ -248,7 +248,7 @@ int float32_compare_quiet( float32 a, float32 b STATUS_PARAM ) int float32_is_signaling_nan( float32 a1) { float32u u; - uint32_t a; + bits32 a; u.f = a1; a = u.i; return ( ( ( a>>22 ) & 0x1FF ) == 0x1FE ) && ( a & 0x003FFFFF ); @@ -257,7 +257,7 @@ int float32_is_signaling_nan( float32 a1) int float32_is_quiet_nan( float32 a1 ) { float32u u; - uint64_t a; + bits32 a; u.f = a1; a = u.i; return ( 0xFF800000 < ( a<<1 ) ); diff --git a/fpu/softfloat-specialize.h b/fpu/softfloat-specialize.h index 5da3a85..f23bd6a 100644 --- a/fpu/softfloat-specialize.h +++ b/fpu/softfloat-specialize.h @@ -76,7 +76,7 @@ typedef struct { int float32_is_quiet_nan( float32 a_ ) { - uint32_t a = float32_val(a_); + bits32 a = float32_val(a_); #if SNAN_BIT_IS_ONE return ( ( ( a>>22 ) & 0x1FF ) == 0x1FE ) && ( a & 0x003FFFFF ); #else @@ -91,7 +91,7 @@ int float32_is_quiet_nan( float32 a_ ) int float32_is_signaling_nan( float32 a_ ) { - uint32_t a = float32_val(a_); + bits32 a = float32_val(a_); #if SNAN_BIT_IS_ONE return ( 0xFF800000 <= (bits32) ( a<<1 ) ); #else @@ -107,7 +107,7 @@ int float32_is_signaling_nan( float32 a_ ) float32 float32_maybe_silence_nan( float32 a_ ) { if (float32_is_signaling_nan(a_)) { - uint32_t a = float32_val(a_); + bits32 a = float32_val(a_); #if SNAN_BIT_IS_ONE a &= ~(1 << 22); #else