CVS commit: src/lib/libc/softfloat/bits64
Module Name:src Committed By: martin Date: Tue Mar 29 18:42:29 UTC 2016 Modified Files: src/lib/libc/softfloat/bits64: softfloat.c Log Message: Avoid warnings (signed/unsigned comparision and unused variable) To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/lib/libc/softfloat/bits64/softfloat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/bits64/softfloat.c diff -u src/lib/libc/softfloat/bits64/softfloat.c:1.13 src/lib/libc/softfloat/bits64/softfloat.c:1.14 --- src/lib/libc/softfloat/bits64/softfloat.c:1.13 Fri Nov 22 17:04:24 2013 +++ src/lib/libc/softfloat/bits64/softfloat.c Tue Mar 29 18:42:29 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: softfloat.c,v 1.13 2013/11/22 17:04:24 martin Exp $ */ +/* $NetBSD: softfloat.c,v 1.14 2016/03/29 18:42:29 martin Exp $ */ /* * This version hacked for use with gcc -msoft-float by bjh21. @@ -46,7 +46,7 @@ this code that are retained. #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: softfloat.c,v 1.13 2013/11/22 17:04:24 martin Exp $"); +__RCSID("$NetBSD: softfloat.c,v 1.14 2016/03/29 18:42:29 martin Exp $"); #endif /* LIBC_SCCS and not lint */ #ifdef SOFTFLOAT_FOR_GCC @@ -661,7 +661,7 @@ static floatx80 { int8 roundingMode; flag roundNearestEven, increment, isTiny; -int64 roundIncrement, roundMask, roundBits; +uint64 roundIncrement, roundMask, roundBits; roundingMode = float_rounding_mode; roundNearestEven = ( roundingMode == float_round_nearest_even ); @@ -3938,7 +3938,7 @@ according to the IEC/IEEE Standard for B */ floatx80 floatx80_rem( floatx80 a, floatx80 b ) { -flag aSign, bSign, zSign; +flag aSign, zSign; int32 aExp, bExp, expDiff; bits64 aSig0, aSig1, bSig; bits64 q, term0, term1, alternateASig0, alternateASig1; @@ -3949,7 +3949,7 @@ floatx80 floatx80_rem( floatx80 a, float aSign = extractFloatx80Sign( a ); bSig = extractFloatx80Frac( b ); bExp = extractFloatx80Exp( b ); -bSign = extractFloatx80Sign( b ); + if ( aExp == 0x7FFF ) { if ((bits64) ( aSig0<<1 ) || ( ( bExp == 0x7FFF ) && (bits64) ( bSig<<1 ) ) ) {
CVS commit: src/lib/libc/softfloat/bits64
Module Name:src Committed By: martin Date: Fri Nov 22 17:04:24 UTC 2013 Modified Files: src/lib/libc/softfloat/bits64: softfloat.c Log Message: Fix a cast from the lint cleanup that made small exponents (i.e. values 1) sign extend wrong and overflow, causing an underflow in all 128 bit sqrt calculations. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/lib/libc/softfloat/bits64/softfloat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/bits64/softfloat.c diff -u src/lib/libc/softfloat/bits64/softfloat.c:1.12 src/lib/libc/softfloat/bits64/softfloat.c:1.13 --- src/lib/libc/softfloat/bits64/softfloat.c:1.12 Thu Jan 10 08:16:11 2013 +++ src/lib/libc/softfloat/bits64/softfloat.c Fri Nov 22 17:04:24 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: softfloat.c,v 1.12 2013/01/10 08:16:11 matt Exp $ */ +/* $NetBSD: softfloat.c,v 1.13 2013/11/22 17:04:24 martin Exp $ */ /* * This version hacked for use with gcc -msoft-float by bjh21. @@ -46,7 +46,7 @@ this code that are retained. #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: softfloat.c,v 1.12 2013/01/10 08:16:11 matt Exp $); +__RCSID($NetBSD: softfloat.c,v 1.13 2013/11/22 17:04:24 martin Exp $); #endif /* LIBC_SCCS and not lint */ #ifdef SOFTFLOAT_FOR_GCC @@ -5261,7 +5261,7 @@ float128 float128_sqrt( float128 a ) if ( ( aSig0 | aSig1 ) == 0 ) return packFloat128( 0, 0, 0, 0 ); normalizeFloat128Subnormal( aSig0, aSig1, aExp, aSig0, aSig1 ); } -zExp = ( (unsigned int)(aExp - 0x3FFF) 1) + 0x3FFE; +zExp = (int32) ( (aExp - 0x3FFF) 1) + 0x3FFE; aSig0 |= LIT64( 0x0001 ); zSig0 = estimateSqrt32((int16)aExp, (bits32)(aSig017)); shortShift128Left( aSig0, aSig1, 13 - ( aExp 1 ), aSig0, aSig1 );
CVS commit: src/lib/libc/softfloat/bits64
Module Name:src Committed By: matt Date: Sat Mar 24 00:06:21 UTC 2012 Modified Files: src/lib/libc/softfloat/bits64: softfloat.c Log Message: Fix a bug introduced by lint cleanup. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libc/softfloat/bits64/softfloat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/bits64/softfloat.c diff -u src/lib/libc/softfloat/bits64/softfloat.c:1.10 src/lib/libc/softfloat/bits64/softfloat.c:1.11 --- src/lib/libc/softfloat/bits64/softfloat.c:1.10 Wed Mar 21 02:32:26 2012 +++ src/lib/libc/softfloat/bits64/softfloat.c Sat Mar 24 00:06:20 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: softfloat.c,v 1.10 2012/03/21 02:32:26 christos Exp $ */ +/* $NetBSD: softfloat.c,v 1.11 2012/03/24 00:06:20 matt Exp $ */ /* * This version hacked for use with gcc -msoft-float by bjh21. @@ -46,7 +46,7 @@ this code that are retained. #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: softfloat.c,v 1.10 2012/03/21 02:32:26 christos Exp $); +__RCSID($NetBSD: softfloat.c,v 1.11 2012/03/24 00:06:20 matt Exp $); #endif /* LIBC_SCCS and not lint */ #ifdef SOFTFLOAT_FOR_GCC @@ -2000,7 +2000,7 @@ float32 float32_div( float32 a, float32 aSig = 1; ++zExp; } -zSig = (bits32)(((bits64) aSig) 32) / bSig; +zSig = (bits32)bits64) aSig) 32) / bSig); if ( ( zSig 0x3F ) == 0 ) { zSig |= ( (bits64) bSig * zSig != ( (bits64) aSig )32 ); }
CVS commit: src/lib/libc/softfloat/bits64
Module Name:src Committed By: martin Date: Tue Mar 20 21:34:51 UTC 2012 Modified Files: src/lib/libc/softfloat/bits64: softfloat.c Log Message: Remove initialized but unused variable To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/softfloat/bits64/softfloat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/bits64/softfloat.c diff -u src/lib/libc/softfloat/bits64/softfloat.c:1.8 src/lib/libc/softfloat/bits64/softfloat.c:1.9 --- src/lib/libc/softfloat/bits64/softfloat.c:1.8 Sun Jul 10 04:52:23 2011 +++ src/lib/libc/softfloat/bits64/softfloat.c Tue Mar 20 21:34:51 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: softfloat.c,v 1.8 2011/07/10 04:52:23 matt Exp $ */ +/* $NetBSD: softfloat.c,v 1.9 2012/03/20 21:34:51 martin Exp $ */ /* * This version hacked for use with gcc -msoft-float by bjh21. @@ -46,7 +46,7 @@ this code that are retained. #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: softfloat.c,v 1.8 2011/07/10 04:52:23 matt Exp $); +__RCSID($NetBSD: softfloat.c,v 1.9 2012/03/20 21:34:51 martin Exp $); #endif /* LIBC_SCCS and not lint */ #ifdef SOFTFLOAT_FOR_GCC @@ -5118,7 +5118,7 @@ according to the IEC/IEEE Standard for B */ float128 float128_rem( float128 a, float128 b ) { -flag aSign, bSign, zSign; +flag aSign, zSign; int32 aExp, bExp, expDiff; bits64 aSig0, aSig1, bSig0, bSig1, q, term0, term1, term2; bits64 allZero, alternateASig0, alternateASig1, sigMean1; @@ -5132,7 +5132,6 @@ float128 float128_rem( float128 a, float bSig1 = extractFloat128Frac1( b ); bSig0 = extractFloat128Frac0( b ); bExp = extractFloat128Exp( b ); -bSign = extractFloat128Sign( b ); if ( aExp == 0x7FFF ) { if (( aSig0 | aSig1 ) || ( ( bExp == 0x7FFF ) ( bSig0 | bSig1 ) ) ) {
CVS commit: src/lib/libc/softfloat/bits64
Module Name:src Committed By: matt Date: Sat Jul 9 02:28:31 UTC 2011 Modified Files: src/lib/libc/softfloat/bits64: softfloat.c Log Message: Add SOFTFLOAT_NEED_FIXUNS condition around the float128 fixuns To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/softfloat/bits64/softfloat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/softfloat/bits64/softfloat.c diff -u src/lib/libc/softfloat/bits64/softfloat.c:1.6 src/lib/libc/softfloat/bits64/softfloat.c:1.7 --- src/lib/libc/softfloat/bits64/softfloat.c:1.6 Mon Jul 4 08:02:35 2011 +++ src/lib/libc/softfloat/bits64/softfloat.c Sat Jul 9 02:28:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: softfloat.c,v 1.6 2011/07/04 08:02:35 matt Exp $ */ +/* $NetBSD: softfloat.c,v 1.7 2011/07/09 02:28:31 matt Exp $ */ /* * This version hacked for use with gcc -msoft-float by bjh21. @@ -46,7 +46,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: softfloat.c,v 1.6 2011/07/04 08:02:35 matt Exp $); +__RCSID($NetBSD: softfloat.c,v 1.7 2011/07/09 02:28:31 matt Exp $); #endif /* LIBC_SCCS and not lint */ #ifdef SOFTFLOAT_FOR_GCC @@ -4482,6 +4482,7 @@ } +#if defined(SOFTFLOAT_FOR_GCC) defined(SOFTFLOAT_NEED_FIXUNS) /* * just like above - but do not care for overflow of signed results */ @@ -4531,6 +4532,7 @@ return z; } +#endif /* defined(SOFTFLOAT_FOR_GCC) defined(SOFTFLOAT_NEED_FIXUNS) */ /* ---