summaryrefslogtreecommitdiff
path: root/stdlib/gen-tst-strtod-round.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2012-09-05 12:37:16 +0200
committerAndreas Schwab <schwab@linux-m68k.org>2012-09-05 12:40:45 +0200
commite1343020fb81b1d034d667aea2d8744afc245e40 (patch)
tree5b0bc32d586d7b4ff9b92e60bdcd5573d28894b2 /stdlib/gen-tst-strtod-round.c
parent0a9f1987ad038f533a4cdff67f5895bb189f6598 (diff)
Correctly handle Motorola extended float format in tst-strtod-round
Diffstat (limited to 'stdlib/gen-tst-strtod-round.c')
-rw-r--r--stdlib/gen-tst-strtod-round.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/stdlib/gen-tst-strtod-round.c b/stdlib/gen-tst-strtod-round.c
index 0a89ff71af..f4ad270152 100644
--- a/stdlib/gen-tst-strtod-round.c
+++ b/stdlib/gen-tst-strtod-round.c
@@ -85,11 +85,14 @@ round_for_all (const char *s)
int emin;
int emax;
bool need_exact;
- } formats[6] = {
+ } formats[7] = {
{ "f", 24, -148, 128, false },
{ "", 53, -1073, 1024, false },
{ "L", 53, -1073, 1024, false },
+ /* This is the Intel extended float format. */
{ "L", 64, -16444, 16384, false },
+ /* This is the Motorola extended float format. */
+ { "L", 64, -16445, 16384, false },
{ "L", 106, -1073, 1024, true },
{ "L", 113, -16493, 16384, false },
};
@@ -103,11 +106,11 @@ round_for_all (const char *s)
}
mpfr_printf ("\",\n");
int i;
- for (i = 0; i < 6; i++)
+ for (i = 0; i < 7; i++)
{
round_str (s, formats[i].suffix, formats[i].prec,
formats[i].emin, formats[i].emax, formats[i].need_exact);
- if (i < 5)
+ if (i < 6)
mpfr_printf (",\n");
}
mpfr_printf ("),\n");