summaryrefslogtreecommitdiff
path: root/gdb/doublest.c
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2003-06-11 23:34:53 +0000
committerJeff Johnston <jjohnstn@redhat.com>2003-06-11 23:34:53 +0000
commit06194148420381854e51d78cf4932a001404b654 (patch)
tree442852c059b6c7e39be2f7f25ea3b8765ba37899 /gdb/doublest.c
parentde4f826b0f698dc2858f6eda71f2613a89579c50 (diff)
downloadbinutils-gdb-06194148420381854e51d78cf4932a001404b654.tar.gz
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.
Diffstat (limited to 'gdb/doublest.c')
-rw-r--r--gdb/doublest.c10
1 files changed, 9 insertions, 1 deletions
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)