diff options
Diffstat (limited to 'gdb/doublest.c')
-rw-r--r-- | gdb/doublest.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gdb/doublest.c b/gdb/doublest.c index 101240b5b6d..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) @@ -625,7 +633,7 @@ floatformat_from_doublest (const struct floatformat *fmt, target-dependent code, the format of floating-point types is known, but not passed on by GDB. This should be fixed. */ -const struct floatformat * +static const struct floatformat * floatformat_from_length (int len) { if (len * TARGET_CHAR_BIT == TARGET_FLOAT_BIT) |