Honour PRIVATE keyword
[deliverable/binutils-gdb.git] / gdb / doublest.c
index caf45fb6474c1aa5becb0ceccba9c8c9f0eed7d0..3f283e13ffa55842eba72b08a4515b52fe0ca38e 100644 (file)
@@ -180,7 +180,7 @@ convert_floatformat_to_doublest (const struct floatformat *fmt,
   if (!special_exponent)
     exponent -= fmt->exp_bias;
   else if (exponent == 0)
-    exponent = 1 - (int) fmt->exp_bias;
+    exponent = 1 - fmt->exp_bias;
 
   /* Build the result algebraically.  Might go infinite, underflow, etc;
      who cares. */
@@ -404,7 +404,15 @@ convert_doublest_to_floatformat (CONST struct floatformat *fmt,
        {
          mant_long <<= 1;
          mant_long &= 0xffffffffL;
-         mant_bits -= 1;
+          /* If we are processing the top 32 mantissa bits of a doublest
+             so as to convert to a float value with implied integer bit,
+             we will only be putting 31 of those 32 bits into the
+             final value due to the discarding of the top bit.  In the 
+             case of a small float value where the number of mantissa 
+             bits is less than 32, discarding the top bit does not alter
+             the number of bits we will be adding to the result.  */
+          if (mant_bits == 32)
+            mant_bits -= 1;
        }
 
       if (mant_bits < 32)
This page took 0.024227 seconds and 4 git commands to generate.