+2019-11-20 Alan Modra <amodra@gmail.com>
+
+ PR 24944
+ * atof-generic.c (atof_generic): Increase decimal guard digits.
+ * testsuite/gas/i386/fp.s: Add more tests.
+ * testsuite/gas/i386/fp.d: Update.
+
2019-11-18 Andrew Burgess <andrew.burgess@embecosm.com>
* as.c (parse_args): Parse --gdwarf-cie-version option.
- address_of_generic_floating_point_number->low
+ 1); /* Number of destination littlenums. */
- /* Includes guard bits (two littlenums worth) */
- maximum_useful_digits = (((precision - 2))
- * ( (LITTLENUM_NUMBER_OF_BITS))
- * 1000000 / 3321928)
- + 2; /* 2 :: guard digits. */
+ /* precision includes two littlenums worth of guard bits,
+ so this gives us 10 decimal guard digits here. */
+ maximum_useful_digits = (precision
+ * LITTLENUM_NUMBER_OF_BITS
+ * 1000000 / 3321928
+ + 1); /* round up. */
if (number_of_digits_available > maximum_useful_digits)
{
.*: file format .*
Contents of section .data:
- 0000 00881bcd 4b789ad4 004071a3 79094f93 ....Kx...@q.y.O.
- 0010 0a40789a 5440789a 54400000 00000000 .@x.T@x.T@......
- 0020 e65e1710 20395e3b e65e1710 20395e3b .\^.. 9\^;.\^.. 9\^;
+ 0000 00881bcd 4b789ad4 004071a3 79094f93 .*
+ 0010 0a40789a 5440789a 54400000 00000000 .*
+ 0020 e65e1710 20395e3b e65e1710 20395e3b .*
+ 0030 00000000 0000a044 01000000 0000a044 .*
+ 0040 00000000 0000f03f .*
# The assembler used to treat the next value as zero instead of 1e-22.
.double .0000000000000000000001
.double 1e-22
+# The assembler used to limit the number of digits too much.
+ .double 37778931862957165903871.0
+ .double 37778931862957165903873.0
+# Ensure we handle a crazy number of digits
+ .double 1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001