From: Toni Wilen Date: Wed, 20 Sep 2023 18:22:29 +0000 (+0300) Subject: softfloat fix (Previous) X-Git-Tag: 5.1.0~103 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=af28515bbd3c54a035309338f6a56653ffe19676;p=francis%2Fwinuae.git softfloat fix (Previous) --- diff --git a/softfloat/softfloat.cpp b/softfloat/softfloat.cpp index b3c0117c..37f2c892 100644 --- a/softfloat/softfloat.cpp +++ b/softfloat/softfloat.cpp @@ -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 ) {