]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Warning fix.
authorToni Wilen <twilen@winuae.net>
Mon, 4 May 2020 15:29:28 +0000 (18:29 +0300)
committerToni Wilen <twilen@winuae.net>
Mon, 4 May 2020 15:29:28 +0000 (18:29 +0300)
softfloat/softfloat.cpp
softfloat/softfloat_decimal.cpp

index 801261d9107ef77346a2d1b1d1a67794b467d48b..da9503379c449f9aa7ea0140a370557dc27a4c23 100644 (file)
@@ -178,7 +178,8 @@ precision80:
             ++zExp;
             zSig0 = LIT64( 0x8000000000000000 );
         } else {
-            zSig0 &= ~ ( ( (uint64_t) ( zSig1<<1 ) == 0 ) & ( status->float_rounding_mode == float_round_nearest_even ) );
+            if ((zSig1 << 1) == 0 && status->float_rounding_mode == float_round_nearest_even)
+                zSig0 &= ~1;
         }
     } else {
         if ( zSig0 == 0 ) zExp = 0;
@@ -297,7 +298,8 @@ precision80:
             ++zExp;
             zSig0 = LIT64( 0x8000000000000000 );
         } else {
-            zSig0 &= ~ ( ( (uint64_t) ( zSig1<<1 ) == 0 ) & ( floatx80_internal_mode == float_round_nearest_even ) );
+            if ((zSig1 << 1) == 0 && floatx80_internal_mode == float_round_nearest_even)
+                zSig0 &= ~1;
         }
     } else {
         if ( zSig0 == 0 ) zExp = 0;
index ccb7f5a974df1f91bccb9c55c42bd56534500c95..a272b0327b101ff9abf9097a34043f0747f37438 100644 (file)
@@ -55,7 +55,8 @@ static void round128to64(flag aSign, int32_t *aExp, uint64_t *aSig0, uint64_t *a
                        ++zExp;
                        zSig0 = LIT64(0x8000000000000000);
                } else {
-                       zSig0 &= ~ (((uint64_t) (zSig1<<1) == 0) & (status->float_rounding_mode == float_round_nearest_even));
+                       if ((zSig1 << 1) == 0 && status->float_rounding_mode == float_round_nearest_even)
+                               zSig0 &= ~1;
                }
        } else {
                if ( zSig0 == 0 ) zExp = 0;