]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* config/atof-ieee.c (gen_to_words): When adding carry back in,
authorIan Lance Taylor <ian@airs.com>
Wed, 3 May 2000 21:24:59 +0000 (21:24 +0000)
committerIan Lance Taylor <ian@airs.com>
Wed, 3 May 2000 21:24:59 +0000 (21:24 +0000)
don't permit lp to become less than the words array.

gas/ChangeLog
gas/config/atof-ieee.c

index 45adb5faf9167b55c9c03027381da0e717f4d614..02ea997ac8a657c8c850161e4e4aa46c78e6fd76 100644 (file)
@@ -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.
index dcda1bcb6a2b081ef662da19f8f9e0eb95be4e1a..2e3c0dc6d0f6cfb177dfd1e4c0d67a26971bc1d0 100644 (file)
@@ -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)
        {