public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/meissner/heads/work032)] PowerPC: Force IBM long double for conversion test.
@ 2021-01-14 3:18 Michael Meissner
0 siblings, 0 replies; 2+ messages in thread
From: Michael Meissner @ 2021-01-14 3:18 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:940d5db0ad50a0ddd2f4ae7d109f6f07e7f9eb51
commit 940d5db0ad50a0ddd2f4ae7d109f6f07e7f9eb51
Author: Michael Meissner <meissner@linux.ibm.com>
Date: Wed Jan 13 22:18:25 2021 -0500
PowerPC: Force IBM long double for conversion test.
The test c-c++-common/dfp/convert-bfp-11.c explicit expects long double to use
the IBM 128-bit extended double format. In particular, some of the tests
expect an infinity to be created if decimal values that are converted that are
too large for IBM extended double. However, the numbers do fit in the range
for IEEE 128-bit format, since it has a larger exponent than the IBM 128-bit
format. The test fails because an infinity is not generated.
We explicitly set the long double type to IBM extended double.
gcc/testsuite/
2021-01-13 Michael Meissner <meissner@linux.ibm.com>
* c-c++-common/dfp/convert-bfp-11.c: Force using IBM 128-bit long
double. Remove check for 64-bit long double.
Diff:
---
gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c b/gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c
index 95c433d2c24..d19d6aa9220 100644
--- a/gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c
+++ b/gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c
@@ -1,9 +1,14 @@
-/* { dg-skip-if "" { ! "powerpc*-*-linux*" } } */
+/* { dg-require-effective-target dfp } */
+/* { dg-require-effective-target ppc_long_double_override_ibm } */
+/* { dg-options "-O2 -mlong-double-128 -mabi=ibmlongdouble -Wno-psabi" } */
-/* Test decimal float conversions to and from IBM 128-bit long double.
- Checks are skipped at runtime if long double is not 128 bits.
- Don't force 128-bit long doubles because runtime support depends
- on glibc. */
+/* We force the long double type to be IBM 128-bit because the CONVERT_TO_PINF
+ tests will fail if we use IEEE 128-bit floating point. This is due to IEEE
+ 128-bit having a larger exponent range than IBM 128-bit extended double. So
+ tests that would generate an infinity with IBM 128-bit will generate a
+ normal number with IEEE 128-bit. */
+
+/* Test decimal float conversions to and from IBM 128-bit long double. */
#include "convert.h"
@@ -36,9 +41,6 @@ CONVERT_TO_PINF (312, tf, sd, 1.6e+308L, d32)
int
main ()
{
- if (sizeof (long double) != 16)
- return 0;
-
convert_101 ();
convert_102 ();
^ permalink raw reply [flat|nested] 2+ messages in thread
* [gcc(refs/users/meissner/heads/work032)] PowerPC: Force IBM long double for conversion test.
@ 2021-01-14 23:35 Michael Meissner
0 siblings, 0 replies; 2+ messages in thread
From: Michael Meissner @ 2021-01-14 23:35 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:c0d0b2edba7322725ff03b6071dc2dc6ff62e80f
commit c0d0b2edba7322725ff03b6071dc2dc6ff62e80f
Author: Michael Meissner <meissner@linux.ibm.com>
Date: Thu Jan 14 18:34:41 2021 -0500
PowerPC: Force IBM long double for conversion test.
The test c-c++-common/dfp/convert-bfp-11.c explicit expects long double to use
the IBM 128-bit extended double format. In particular, some of the tests
expect an infinity to be created if decimal values that are converted that are
too large for IBM extended double. However, the numbers do fit in the range
for IEEE 128-bit format, since it has a larger exponent than the IBM 128-bit
format. The test fails because an infinity is not generated.
We explicitly set the long double type to IBM extended double.
gcc/testsuite/
2021-01-14 Michael Meissner <meissner@linux.ibm.com>
* c-c++-common/dfp/convert-bfp-11.c: Force using IBM 128-bit long
double. Remove check for 64-bit long double.
Diff:
---
gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c b/gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c
index 95c433d2c24..35da07d1fa4 100644
--- a/gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c
+++ b/gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c
@@ -1,9 +1,14 @@
-/* { dg-skip-if "" { ! "powerpc*-*-linux*" } } */
+/* { dg-require-effective-target dfp } */
+/* { dg-require-effective-target ppc_long_double_override_ibm128 } */
+/* { dg-add-options ppc_long_double_override_ibm128 } */
-/* Test decimal float conversions to and from IBM 128-bit long double.
- Checks are skipped at runtime if long double is not 128 bits.
- Don't force 128-bit long doubles because runtime support depends
- on glibc. */
+/* We force the long double type to be IBM 128-bit because the CONVERT_TO_PINF
+ tests will fail if we use IEEE 128-bit floating point. This is due to IEEE
+ 128-bit having a larger exponent range than IBM 128-bit extended double. So
+ tests that would generate an infinity with IBM 128-bit will generate a
+ normal number with IEEE 128-bit. */
+
+/* Test decimal float conversions to and from IBM 128-bit long double. */
#include "convert.h"
@@ -36,9 +41,6 @@ CONVERT_TO_PINF (312, tf, sd, 1.6e+308L, d32)
int
main ()
{
- if (sizeof (long double) != 16)
- return 0;
-
convert_101 ();
convert_102 ();
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-14 23:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-14 3:18 [gcc(refs/users/meissner/heads/work032)] PowerPC: Force IBM long double for conversion test Michael Meissner
2021-01-14 23:35 Michael Meissner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).