From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LBSwt-0002N9-5c for qemu-devel@nongnu.org; Sat, 13 Dec 2008 06:46:19 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LBSws-0002M2-5I for qemu-devel@nongnu.org; Sat, 13 Dec 2008 06:46:18 -0500 Received: from [199.232.76.173] (port=40501 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBSwr-0002Lo-Rp for qemu-devel@nongnu.org; Sat, 13 Dec 2008 06:46:17 -0500 Received: from savannah.gnu.org ([199.232.41.3]:44737 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 1LBSwr-00055d-Gs for qemu-devel@nongnu.org; Sat, 13 Dec 2008 06:46:17 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LBSwq-00054I-Hu for qemu-devel@nongnu.org; Sat, 13 Dec 2008 11:46:16 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LBSwq-00054E-82 for qemu-devel@nongnu.org; Sat, 13 Dec 2008 11:46:16 +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: Sat, 13 Dec 2008 11:46:16 +0000 Subject: [Qemu-devel] [6002] softfloat-native: add float32_is_nan() 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: 6002 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6002 Author: aurel32 Date: 2008-12-13 11:46:15 +0000 (Sat, 13 Dec 2008) Log Message: ----------- softfloat-native: add float32_is_nan() Signed-off-by: Aurelien Jarno Modified Paths: -------------- trunk/fpu/softfloat-native.c trunk/fpu/softfloat-native.h Modified: trunk/fpu/softfloat-native.c =================================================================== --- trunk/fpu/softfloat-native.c 2008-12-13 11:37:02 UTC (rev 6001) +++ trunk/fpu/softfloat-native.c 2008-12-13 11:46:15 UTC (rev 6002) @@ -250,6 +250,15 @@ return ( ( ( a>>22 ) & 0x1FF ) == 0x1FE ) && ( a & 0x003FFFFF ); } +int float32_is_nan( float32 a1 ) +{ + float32u u; + uint64_t a; + u.f = a1; + a = u.i; + return ( 0xFF800000 < ( a<<1 ) ); +} + /*---------------------------------------------------------------------------- | Software IEC/IEEE double-precision conversion routines. *----------------------------------------------------------------------------*/ Modified: trunk/fpu/softfloat-native.h =================================================================== --- trunk/fpu/softfloat-native.h 2008-12-13 11:37:02 UTC (rev 6001) +++ trunk/fpu/softfloat-native.h 2008-12-13 11:46:15 UTC (rev 6002) @@ -246,6 +246,7 @@ int float32_compare( float32, float32 STATUS_PARAM ); int float32_compare_quiet( float32, float32 STATUS_PARAM ); int float32_is_signaling_nan( float32 ); +int float32_is_nan( float32 ); INLINE float32 float32_abs(float32 a) {