aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2000-05-03 21:24:59 +0000
committerIan Lance Taylor <ian@airs.com>2000-05-03 21:24:59 +0000
commit6f3c4363ce5392cb5fa6673a4d22b94b52a8970d (patch)
treea753173884c81b40656088a403325179f0a90311
parent9bdbac4d7f7f5f64840618ad02421c1fd553019c (diff)
downloadgdb-6f3c4363ce5392cb5fa6673a4d22b94b52a8970d.zip
gdb-6f3c4363ce5392cb5fa6673a4d22b94b52a8970d.tar.gz
gdb-6f3c4363ce5392cb5fa6673a4d22b94b52a8970d.tar.bz2
* config/atof-ieee.c (gen_to_words): When adding carry back in,
don't permit lp to become less than the words array.
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/atof-ieee.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 45adb5f..02ea997 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2000-05-03 Ian Lance Taylor <ian@zembu.com>
+
+ * config/atof-ieee.c (gen_to_words): When adding carry back in,
+ don't permit lp to become less than the words array.
+
2000-05-03 David O'Brien <obrien@NUXI.com>
* as.c (parse_args): Update copyright.
diff --git a/gas/config/atof-ieee.c b/gas/config/atof-ieee.c
index dcda1bc..2e3c0dc 100644
--- a/gas/config/atof-ieee.c
+++ b/gas/config/atof-ieee.c
@@ -1,5 +1,5 @@
/* atof_ieee.c - turn a Flonum into an IEEE floating point number
- Copyright (C) 1987, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright (C) 1987, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -624,11 +624,13 @@ gen_to_words (words, precision, exponent_bits)
don't get a sticky sign bit after shifting right, and that
permits us to propagate the carry without any masking of bits.
#endif */
- for (carry = 1, lp--; carry && (lp >= words); lp--)
+ for (carry = 1, lp--; carry; lp--)
{
carry = *lp + carry;
*lp = carry;
carry >>= LITTLENUM_NUMBER_OF_BITS;
+ if (lp == words)
+ break;
}
if (precision == X_PRECISION && exponent_bits == 15)
{