From: Jeff Johnston Date: Wed, 11 Jun 2003 23:34:53 +0000 (+0000) Subject: 2003-06-11 Jeff Johnston X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=06194148420381854e51d78cf4932a001404b654;p=binutils-gdb.git 2003-06-11 Jeff Johnston * 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2e68c9aa610..50b1e2761df 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2003-06-11 Jeff Johnston + + * 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 * dictionary.h: New. diff --git a/gdb/doublest.c b/gdb/doublest.c index caf45fb6474..09bb15502ba 100644 --- a/gdb/doublest.c +++ b/gdb/doublest.c @@ -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)