diff options
author | Ian Lance Taylor <ian@airs.com> | 2000-05-03 21:23:52 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2000-05-03 21:23:52 +0000 |
commit | 44877466ff0aa3f30239ce6132ce00965a70c246 (patch) | |
tree | ebfc700c62ea361d049c74de3ea2304f0166df60 /gas/config/atof-ieee.c | |
parent | d41707c8687e8a3b364998a5b654f23afa5d8e77 (diff) | |
download | binutils-44877466ff0aa3f30239ce6132ce00965a70c246.zip binutils-44877466ff0aa3f30239ce6132ce00965a70c246.tar.gz binutils-44877466ff0aa3f30239ce6132ce00965a70c246.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.
Diffstat (limited to 'gas/config/atof-ieee.c')
-rw-r--r-- | gas/config/atof-ieee.c | 6 |
1 files changed, 4 insertions, 2 deletions
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) { |