summaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2012-09-05 13:45:10 +0200
committerAndreas Schwab <schwab@linux-m68k.org>2012-09-05 13:53:43 +0200
commita0070b7e7054df5f2a8da0467f15496ef8a3662f (patch)
treed76a4f72913536a525e474fd1358268765a71ab2 /stdlib
parente1343020fb81b1d034d667aea2d8744afc245e40 (diff)
downloadglibc-a0070b7e7054df5f2a8da0467f15496ef8a3662f.tar.gz
Use LDBL_MIN_EXP to distinguish Intel and Motorola extended float format
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/tst-strtod-round.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/stdlib/tst-strtod-round.c b/stdlib/tst-strtod-round.c
index 3e75c11c91..1edeff6c17 100644
--- a/stdlib/tst-strtod-round.c
+++ b/stdlib/tst-strtod-round.c
@@ -39,26 +39,22 @@ struct test {
ld106exact, ld106d, ld106n, ld106z, ld106u, \
ld113d, ld113n, ld113z, ld113u) \
{ s, fn, dn, true, ld53n }
-#elif LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384
-# if defined __i386__ || defined __x86_64__ || defined __ia64__
+#elif LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384 && LDBL_MIN_EXP == -16381
/* This is for the Intel extended float format. */
-# define TEST(s, fd, fn, fz, fu, dd, dn, dz, du, ld53d, ld53n, ld53z, ld53u, \
- ld64id, ld64in, ld64iz, ld64iu, \
- ld64md, ld64mn, ld64mz, ld64mu, \
- ld106exact, ld106d, ld106n, ld106z, ld106u, \
- ld113d, ld113n, ld113z, ld113u) \
+# define TEST(s, fd, fn, fz, fu, dd, dn, dz, du, ld53d, ld53n, ld53z, ld53u, \
+ ld64id, ld64in, ld64iz, ld64iu, \
+ ld64md, ld64mn, ld64mz, ld64mu, \
+ ld106exact, ld106d, ld106n, ld106z, ld106u, \
+ ld113d, ld113n, ld113z, ld113u) \
{ s, fn, dn, true, ld64in }
-# elif defined __mc68000__
+#elif LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384 && LDBL_MIN_EXP == -16382
/* This is for the Motorola extended float format. */
-# define TEST(s, fd, fn, fz, fu, dd, dn, dz, du, ld53d, ld53n, ld53z, ld53u, \
- ld64id, ld64in, ld64iz, ld64iu, \
- ld64md, ld64mn, ld64mz, ld64mu, \
- ld106exact, ld106d, ld106n, ld106z, ld106u, \
- ld113d, ld113n, ld113z, ld113u) \
+# define TEST(s, fd, fn, fz, fu, dd, dn, dz, du, ld53d, ld53n, ld53z, ld53u, \
+ ld64id, ld64in, ld64iz, ld64iu, \
+ ld64md, ld64mn, ld64mz, ld64mu, \
+ ld106exact, ld106d, ld106n, ld106z, ld106u, \
+ ld113d, ld113n, ld113z, ld113u) \
{ s, fn, dn, true, ld64mn }
-# else
-# error "unknown long double format"
-# endif
#elif LDBL_MANT_DIG == 106 && LDBL_MAX_EXP == 1024
# define TEST(s, fd, fn, fz, fu, dd, dn, dz, du, ld53d, ld53n, ld53z, ld53u, \
ld64id, ld64in, ld64iz, ld64iu, \