diff options
author | DJ Delorie <dj@redhat.com> | 2007-11-13 01:00:40 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2007-11-13 01:00:40 +0000 |
commit | f4c43811f70f34738c0ee211903fdfc25fac1ef6 (patch) | |
tree | d2e4d494e59813a6a8a2fa6079eeb73d0e5ced65 /libiberty/floatformat.c | |
parent | 3702a1b884f87a887dd2f677e01d756adac8cfec (diff) | |
download | gdb-f4c43811f70f34738c0ee211903fdfc25fac1ef6.zip gdb-f4c43811f70f34738c0ee211903fdfc25fac1ef6.tar.gz gdb-f4c43811f70f34738c0ee211903fdfc25fac1ef6.tar.bz2 |
merge from gcc
Diffstat (limited to 'libiberty/floatformat.c')
-rw-r--r-- | libiberty/floatformat.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libiberty/floatformat.c b/libiberty/floatformat.c index cbf13ea..07af726 100644 --- a/libiberty/floatformat.c +++ b/libiberty/floatformat.c @@ -283,7 +283,7 @@ floatformat_ibm_long_double_is_valid (const struct floatformat *fmt, bot_exp = get_field (ufrom + 8, hfmt->byteorder, hfmt->totalsize, hfmt->exp_start, hfmt->exp_len); - if ((unsigned long) top_exp == hfmt->exp_nan) + if (top_exp == hfmt->exp_nan) top_nan = mant_bits_set (hfmt, ufrom); /* A NaN is valid with any low part. */ @@ -292,8 +292,11 @@ floatformat_ibm_long_double_is_valid (const struct floatformat *fmt, /* An infinity, zero or denormal requires low part 0 (positive or negative). */ - if ((unsigned long) top_exp == hfmt->exp_nan || top_exp == 0) + if (top_exp == hfmt->exp_nan || top_exp == 0) { + unsigned int mant_bits, mant_off; + int mant_bits_left; + if (bot_exp != 0) return 0; @@ -315,7 +318,7 @@ floatformat_ibm_long_double_is_valid (const struct floatformat *fmt, /* The bottom part is 0 or denormal. Determine which, and if denormal the first two set bits. */ int first_bit = -1, second_bit = -1, cur_bit; - for (cur_bit = 0; (unsigned int) cur_bit < hfmt->man_len; cur_bit++) + for (cur_bit = 0; cur_bit < hfmt->man_len; cur_bit++) if (get_field (ufrom + 8, hfmt->byteorder, hfmt->totalsize, hfmt->man_start + cur_bit, 1)) { @@ -360,7 +363,7 @@ const struct floatformat floatformat_ibm_long_double = floatformat_big, 128, 0, 1, 11, 1023, 2047, 12, 52, floatformat_intbit_no, "floatformat_ibm_long_double", - floatformat_ibm_long_double_is_valid, + floatformat_always_valid, &floatformat_ieee_double_big }; |