2003-06-11 Jeff Johnston <jjohnstn@redhat.com>
authorJeff Johnston <jjohnstn@redhat.com>
Wed, 11 Jun 2003 23:34:53 +0000 (23:34 +0000)
committerJeff Johnston <jjohnstn@redhat.com>
Wed, 11 Jun 2003 23:34:53 +0000 (23:34 +0000)
        * doublest.c (convert_doublest_to_floatformat): When dealing
        with the implied integer bit, only alter mant_bits if we are
        processing a full 32 bits of mantissa.

gdb/ChangeLog
gdb/doublest.c

index 2e68c9aa610ecd8a0da4288c3f67bbc1b92e0043..50b1e2761dfbba4cd3aa31e9904b29d84d58de18 100644 (file)
@@ -1,3 +1,9 @@
+2003-06-11  Jeff Johnston  <jjohnstn@redhat.com>
+
+       * doublest.c (convert_doublest_to_floatformat): When dealing 
+       with the implied integer bit, only alter mant_bits if we are 
+       processing a full 32 bits of mantissa.
+
 2003-06-11  David Carlton  <carlton@bactrian.org>
 
        * dictionary.h: New.
index caf45fb6474c1aa5becb0ceccba9c8c9f0eed7d0..09bb15502ba3c4a6bd749c87c1be183f7a72f212 100644 (file)
@@ -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.029952 seconds and 4 git commands to generate.