diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2014-05-30 11:34:23 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2014-05-30 11:39:19 +0100 |
commit | e962c07c0c8bb18f9a5969cbf1ddb01d0fe4f55c (patch) | |
tree | 38d6fe0064e86d3bb81ede9e3ce38997e8fcd854 /tests/test-isinf.c | |
parent | a14d4c0c7c41c726497673825abd832d9cad74b9 (diff) | |
download | gnulib-e962c07c0c8bb18f9a5969cbf1ddb01d0fe4f55c.tar.gz |
isfinite, isinf, isnan tests: fix for little-endian PowerPC
* tests/test-isfinite.c (test_isfinitel): Only manipulate the
first double of a PowerPC "double double" pair.
* tests/test-isinf.c (test_isinfl): Likewise.
* tests/test-isnan.c (test_long_double): Likewise.
* tests/test-isnanl.h (main): Likewise.
* tests/test-signbit.c (test_signbitl): Likewise.
Diffstat (limited to 'tests/test-isinf.c')
-rw-r--r-- | tests/test-isinf.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test-isinf.c b/tests/test-isinf.c index 0a13224e05..2505c32018 100644 --- a/tests/test-isinf.c +++ b/tests/test-isinf.c @@ -158,6 +158,15 @@ test_isinfl () /* A bit pattern that is different from a Quiet NaN. With a bit of luck, it's a Signalling NaN. */ { +#if defined __powerpc__ && LDBL_MANT_DIG == 106 + /* This is PowerPC "double double", a pair of two doubles. Inf and Nan are + represented as the corresponding 64-bit IEEE values in the first double; + the second is ignored. Manipulate only the first double. */ + #undef NWORDS + #define NWORDS \ + ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +#endif + memory_long_double m; m.value = zerol / zerol; # if LDBL_EXPBIT0_BIT > 0 |