]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
softfloat fix (Previous)
authorToni Wilen <twilen@winuae.net>
Wed, 20 Sep 2023 18:22:29 +0000 (21:22 +0300)
committerToni Wilen <twilen@winuae.net>
Wed, 20 Sep 2023 18:22:29 +0000 (21:22 +0300)
softfloat/softfloat.cpp

index b3c0117c913b2653046cc6907c73b6c68b63244e..37f2c892a52f1cabff92f16f0fcd0d5acfcc2bd4 100644 (file)
@@ -2319,11 +2319,19 @@ static floatx80 addFloatx80Sigs(floatx80 a, floatx80 b, flag zSign,
     bExp = extractFloatx80Exp( b );
 #ifdef SOFTFLOAT_68K
        if ( aExp == 0 ) {
-               normalizeFloatx80Subnormal( aSig, &aExp, &aSig );
-       }
+        if (aSig == 0) {
+            aExp = -64;
+        } else {
+            normalizeFloatx80Subnormal(aSig, &aExp, &aSig);
+        }
+    }
        if ( bExp == 0 ) {
-               normalizeFloatx80Subnormal( bSig, &bExp, &bSig );
-       }
+        if (bSig == 0) {
+            bExp = -64;
+        } else {
+            normalizeFloatx80Subnormal(bSig, &bExp, &bSig);
+        }
+    }
 #endif
     expDiff = aExp - bExp;
     if ( 0 < expDiff ) {