From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LCLbV-0007zz-Vj for qemu-devel@nongnu.org; Mon, 15 Dec 2008 17:07:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LCLbV-0007zO-Ai for qemu-devel@nongnu.org; Mon, 15 Dec 2008 17:07:53 -0500 Received: from [199.232.76.173] (port=34079 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCLbV-0007zE-1v for qemu-devel@nongnu.org; Mon, 15 Dec 2008 17:07:53 -0500 Received: from savannah.gnu.org ([199.232.41.3]:60279 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LCLbU-00006I-Br for qemu-devel@nongnu.org; Mon, 15 Dec 2008 17:07:52 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LCLbT-0007Ki-0s for qemu-devel@nongnu.org; Mon, 15 Dec 2008 22:07:51 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LCLbS-0007Kd-NX for qemu-devel@nongnu.org; Mon, 15 Dec 2008 22:07:50 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Mon, 15 Dec 2008 22:07:50 +0000 Subject: [Qemu-devel] [6059] softfloat-native: improve correctness of floatXX_is_neg() Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6059 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6059 Author: aurel32 Date: 2008-12-15 22:07:50 +0000 (Mon, 15 Dec 2008) Log Message: ----------- softfloat-native: improve correctness of floatXX_is_neg() Signed-off-by: Aurelien Jarno Modified Paths: -------------- trunk/fpu/softfloat-native.h Modified: trunk/fpu/softfloat-native.h =================================================================== --- trunk/fpu/softfloat-native.h 2008-12-15 21:48:27 UTC (rev 6058) +++ trunk/fpu/softfloat-native.h 2008-12-15 22:07:50 UTC (rev 6059) @@ -265,7 +265,9 @@ INLINE float32 float32_is_neg(float32 a) { - return a < 0.0; + float32u u; + u.f = a; + return u.i >> 31; } INLINE float32 float32_is_zero(float32 a) @@ -372,7 +374,9 @@ INLINE float64 float64_is_neg(float64 a) { - return a < 0.0; + float64u u; + u.f = a; + return u.i >> 63; } INLINE float64 float64_is_zero(float64 a) @@ -474,7 +478,9 @@ INLINE floatx80 floatx80_is_neg(floatx80 a) { - return a < 0.0; + floatx80u u; + u.f = a; + return u.i.high >> 15; } INLINE floatx80 floatx80_is_zero(floatx80 a)