Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/softfloat/bits32 add casts
details: https://anonhg.NetBSD.org/src/rev/9978163bedf6
branches: trunk
changeset: 778298:9978163bedf6
user: christos <christos%NetBSD.org@localhost>
date: Wed Mar 21 14:17:54 2012 +0000
description:
add casts
diffstat:
lib/libc/softfloat/bits32/softfloat.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (72 lines):
diff -r 46a9c27f4919 -r 9978163bedf6 lib/libc/softfloat/bits32/softfloat.c
--- a/lib/libc/softfloat/bits32/softfloat.c Wed Mar 21 14:17:22 2012 +0000
+++ b/lib/libc/softfloat/bits32/softfloat.c Wed Mar 21 14:17:54 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: softfloat.c,v 1.1 2002/05/21 23:51:07 bjh21 Exp $ */
+/* $NetBSD: softfloat.c,v 1.2 2012/03/21 14:17:54 christos Exp $ */
/*
* This version hacked for use with gcc -msoft-float by bjh21.
@@ -53,7 +53,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: softfloat.c,v 1.1 2002/05/21 23:51:07 bjh21 Exp $");
+__RCSID("$NetBSD: softfloat.c,v 1.2 2012/03/21 14:17:54 christos Exp $");
#endif /* LIBC_SCCS and not lint */
#ifdef SOFTFLOAT_FOR_GCC
@@ -237,7 +237,7 @@
isTiny =
( float_detect_tininess == float_tininess_before_rounding )
|| ( zExp < -1 )
- || ( zSig + roundIncrement < 0x80000000 );
+ || ( zSig + roundIncrement < (uint32)0x80000000 );
shift32RightJamming( zSig, - zExp, &zSig );
zExp = 0;
roundBits = zSig & 0x7F;
@@ -281,7 +281,7 @@
INLINE bits32 extractFloat64Frac1( float64 a )
{
- return FLOAT64_DEMANGLE(a) & LIT64( 0x00000000FFFFFFFF );
+ return (bits32)(FLOAT64_DEMANGLE(a) & LIT64(0x00000000FFFFFFFF));
}
@@ -294,7 +294,7 @@
INLINE bits32 extractFloat64Frac0( float64 a )
{
- return ( FLOAT64_DEMANGLE(a)>>32 ) & 0x000FFFFF;
+ return (bits32)((FLOAT64_DEMANGLE(a) >> 32) & 0x000FFFFF);
}
@@ -306,7 +306,7 @@
INLINE int16 extractFloat64Exp( float64 a )
{
- return ( FLOAT64_DEMANGLE(a)>>52 ) & 0x7FF;
+ return (int16)((FLOAT64_DEMANGLE(a) >> 52) & 0x7FF);
}
@@ -318,7 +318,7 @@
INLINE flag extractFloat64Sign( float64 a )
{
- return FLOAT64_DEMANGLE(a)>>63;
+ return (flag)(FLOAT64_DEMANGLE(a) >> 63);
}
@@ -535,7 +535,7 @@
if ( a == 0 ) return 0;
if ( a == (sbits32) 0x80000000 ) return packFloat32( 1, 0x9E, 0 );
zSign = ( a < 0 );
- return normalizeRoundAndPackFloat32( zSign, 0x9C, zSign ? - a : a );
+ return normalizeRoundAndPackFloat32(zSign, 0x9C, (uint32)(zSign ? - a : a));
}
Home |
Main Index |
Thread Index |
Old Index