From: Sebastien Bourdeauducq Date: Thu, 24 May 2012 21:25:59 +0000 (+0200) Subject: software/libbase: fix softfloat compilation warnings X-Git-Tag: 24jan2021_ls180~3171 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=275caae7f00c3bd05c496d49667ac04d3269a529;p=litex.git software/libbase: fix softfloat compilation warnings --- diff --git a/software/libbase/softfloat.c b/software/libbase/softfloat.c index 30ed86d7..27a156e4 100644 --- a/software/libbase/softfloat.c +++ b/software/libbase/softfloat.c @@ -1028,7 +1028,7 @@ float32 float32_rem( float32 a, float32 b ) { flag aSign, bSign, zSign; int16 aExp, bExp, expDiff; - bits32 aSig, bSig, q, allZero, alternateASig; + bits32 aSig, bSig, q, alternateASig; sbits32 sigMean; aSig = extractFloat32Frac( a ); @@ -1257,7 +1257,6 @@ flag float32_eq_signaling( float32 a, float32 b ) flag float32_le_quiet( float32 a, float32 b ) { flag aSign, bSign; - int16 aExp, bExp; if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) @@ -1995,7 +1994,7 @@ float64 float64_rem( float64 a, float64 b ) sub64( aSig0, aSig1, bSig0, bSig1, &aSig0, &aSig1 ); } while ( 0 <= (sbits32) aSig0 ); add64( - aSig0, aSig1, alternateASig0, alternateASig1, &sigMean0, &sigMean1 ); + aSig0, aSig1, alternateASig0, alternateASig1, (bits32 *)&sigMean0, &sigMean1 ); if ( ( sigMean0 < 0 ) || ( ( ( sigMean0 | sigMean1 ) == 0 ) && ( q & 1 ) ) ) { aSig0 = alternateASig0; diff --git a/software/libbase/softfloat.h b/software/libbase/softfloat.h index 5eb9707a..0dad06b4 100644 --- a/software/libbase/softfloat.h +++ b/software/libbase/softfloat.h @@ -105,6 +105,7 @@ flag float32_lt( float32, float32 ); flag float32_eq_signaling( float32, float32 ); flag float32_le_quiet( float32, float32 ); flag float32_lt_quiet( float32, float32 ); +flag float32_is_nan( float32 ); flag float32_is_signaling_nan( float32 ); /*---------------------------------------------------------------------------- @@ -130,5 +131,6 @@ flag float64_lt( float64, float64 ); flag float64_eq_signaling( float64, float64 ); flag float64_le_quiet( float64, float64 ); flag float64_lt_quiet( float64, float64 ); +flag float64_is_nan( float64 ); flag float64_is_signaling_nan( float64 );