Re: [hatari-devel] FPU update |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Le 21/04/2017 à 15:33, Nicolas Pomarède a écrit :
In file included from
/home/npomarede/src/hatari-fpu/src/cpu/fpp_softfloat.c:31:0:
/home/npomarede/src/hatari-fpu/src/cpu/softfloat/softfloat-specialize.h:
In function 'propagateFloatx80NaN':
/home/npomarede/src/hatari-fpu/src/cpu/softfloat/softfloat-specialize.h:349:35:
warning: variable 'bIsNaN' set but not used [-Wunused-but-set-variable]
flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN;
^
Hi
this will fix the above warning by using bIsNaN only when SOFTFLOAT_68K
is not used. This just move some code, no side effect to expect.
diff -r d84dc2131312 src/cpu/softfloat/softfloat-specialize.h
--- a/src/cpu/softfloat/softfloat-specialize.h Sat Apr 22 15:58:33 2017
+0200
+++ b/src/cpu/softfloat/softfloat-specialize.h Sun Apr 23 18:59:27 2017
+0200
@@ -320,11 +320,12 @@
static inline floatx80 propagateFloatx80NaN( floatx80 a, floatx80 b,
float_status *status )
{
- flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN;
-
+ flag aIsNaN, aIsSignalingNaN, bIsSignalingNaN;
+#ifndef SOFTFLOAT_68K
+ flag bIsNaN;
+#endif
aIsNaN = floatx80_is_nan( a );
aIsSignalingNaN = floatx80_is_signaling_nan( a );
- bIsNaN = floatx80_is_nan( b );
bIsSignalingNaN = floatx80_is_signaling_nan( b );
#ifdef SOFTFLOAT_68K
a.low |= LIT64( 0x4000000000000000 );
@@ -332,6 +333,7 @@
if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise(
float_flag_signaling, status );
return aIsNaN ? a : b;
#else
+ bIsNaN = floatx80_is_nan( b );
a.low |= LIT64( 0xC000000000000000 );
b.low |= LIT64( 0xC000000000000000 );
if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise(
float_flag_signaling, status );
Nicolas