]> git.proxmox.com Git - qemu.git/blobdiff - fpu/softfloat.c
qdev-properties-system.c: Allow vlan or netdev for -device, not both
[qemu.git] / fpu / softfloat.c
index 83ccc4b8cd31254d449a28e29d88375a8d928aee..7ba51b6f3c11bd08f1a41478afdf89d23bfcb4a3 100644 (file)
@@ -3898,9 +3898,15 @@ float64 float64_muladd(float64 a, float64 b, float64 c, int flags STATUS_PARAM)
             }
             zExp -= shiftcount;
         } else {
-            shiftcount = countLeadingZeros64(zSig1) - 1;
-            zSig0 = zSig1 << shiftcount;
-            zExp -= (shiftcount + 64);
+            shiftcount = countLeadingZeros64(zSig1);
+            if (shiftcount == 0) {
+                zSig0 = (zSig1 >> 1) | (zSig1 & 1);
+                zExp -= 63;
+            } else {
+                shiftcount--;
+                zSig0 = zSig1 << shiftcount;
+                zExp -= (shiftcount + 64);
+            }
         }
         return roundAndPackFloat64(zSign, zExp, zSig0 STATUS_VAR);
     }