public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATH 0/3] Updated PowerPC tests for long double
@ 2020-11-21  5:22 Michael Meissner
  2020-11-21  5:33 ` [PATCH 1/3] PowerPC: Add long double target-supports Michael Meissner
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Michael Meissner @ 2020-11-21  5:22 UTC (permalink / raw)
  To: gcc-patches, Michael Meissner, Segher Boessenkool,
	David Edelsohn, Bill Schmidt, Peter Bergner

These 3 patches are the slight reworking of two separate patches for the
library tests.

The first patch that has been replaced is:
Date: Sun, 15 Nov 2020 12:17:47 -0500
Subject: [PATCH] PowerPC Fix ibm128 defaults for pr70117.c test.
Message-ID: <20201115171747.GA10343@ibm-toto.the-meissners.org>

The second patch that has been replaced is:
Date: Sun, 15 Nov 2020 12:23:50 -050
Subject: [PATCH] PowerPC: Restrict long double test to use IBM long double.
Message-ID: <20201115172350.GA10956@ibm-toto.the-meissners.org>

These 3 patches are:

1) Patch to target-supports.exp that adds 3 new targets to explicitly test for
the PowerPC long double type.  In the previous patches, I only added the patch
that I needed (long double == IBM 128-bit).  This time, I'm adding all 3
varieties of long double.  I also insured that the target-supports only runs on
PowerPC.

2) Patch to gcc/testsuite/gcc.target/powerpc/pr70117.c to restrict it to IBM
128-bit long double.  I removed the #ifdefs in the test that tried to use
__ibm128.  The previous patch tried to use a #define for the IEEE 128-bit
maximum value.

3) Patch to gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c to only run the
test if long double is IBM 128-bit.  I moved the target supports code to the
first patch in this series.  I also changed the requirement from powerpc-linux
to dfp.

I have run these tests with compilers using IEEE 128-bit long double, IBM
128-bit long double, and 64-bit long double.  I verified that the tests are
skipped as UNSUPPORTED if long double is not IBM 128-bit, and they pass on IBM
128-bit long double.

Can I check these patches into the master branch?  Ideally, I would like to
back port these patches to earlier GCC branches.

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.ibm.com, phone: +1 (978) 899-4797

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/3] PowerPC: Add long double target-supports.
  2020-11-21  5:22 [PATH 0/3] Updated PowerPC tests for long double Michael Meissner
@ 2020-11-21  5:33 ` Michael Meissner
  2020-11-23 20:28   ` Segher Boessenkool
  2020-11-21  5:37 ` [PATCH 2/3] PowerPC: require IBM long double for pr70117 Michael Meissner
  2020-11-21  5:39 ` [PATCH 3/3] PowerPC: Require IBM long double for conversion test Michael Meissner
  2 siblings, 1 reply; 11+ messages in thread
From: Michael Meissner @ 2020-11-21  5:33 UTC (permalink / raw)
  To: Michael Meissner, gcc-patches, Segher Boessenkool,
	David Edelsohn, Bill Schmidt, Peter Bergner

PowerPC: Add long double target-supports.

This patch adds 3 target supports to test what type of PowerPC long double is
used by the test:

   1)	Long double uses the IBM 128-bit extended double format;
   2)	Long double uses the IEEE 128-bit format; (and)
   3)	Long double uses the 64-bit format.

I have tested this patch and the following two patches in this series with
compilers with the 3 different long double types.  I verified that the two
tests being modified both are labeled as UNSUPPORTED if long double is not IBM
128-bit, and if long double is IBM 128-bit, the tests pass.

Can I check this into the master branch?  I think this patch should also be
back ported to the earlier branches.

gcc/testsuite/
2020-11-21  Michael Meissner  <meissner@linux.ibm.com>

	* lib/target-supports.exp (check_ppc_long_double_ibm): New
	function.
	(check_ppc_long_double_ieee): New function.
	(check_ppc_long_double_64bit): New function.
	(is-effective-target): Add ppc_long_double_ibm,
	ppc_long_double_ieee, and ppc_long_double_64bit.
---
 gcc/testsuite/lib/target-supports.exp | 56 +++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 22acda2a74f..adcb789d136 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -2336,6 +2336,59 @@ proc check_effective_target_ppc_ieee128_ok { } {
     }]
 }
 
+# See if the target is a powerpc with the long double format that uses the IBM
+# extended double format.
+
+proc check_ppc_long_double_ibm { } {
+    return [check_cached_effective_target ppc_long_double_ibm {
+	check_runtime_nocache ppc_long_double_ibm {
+	    int main()
+	    {
+	      #if !defined(_ARCH_PPC) || !defined(__LONG_DOUBLE_IBM128__)
+		return 1;
+	      #else
+		return 0;
+	      #endif
+	    }
+	}
+    }]
+}
+
+# See if the target is a powerpc with the long double format that uses the IEEE
+# 128-bit format.
+
+proc check_ppc_long_double_ieee { } {
+    return [check_cached_effective_target ppc_long_double_ieee {
+	check_runtime_nocache ppc_long_double_ieee {
+	    int main()
+	    {
+	      #if !defined(_ARCH_PPC) || !defined(__LONG_DOUBLE_IEEE128__)
+		return 1;
+	      #else
+		return 0;
+	      #endif
+	    }
+	}
+    }]
+}
+
+# See if the target is a powerpc with the long double format that is 64-bit.
+
+proc check_ppc_long_double_64bit { } {
+    return [check_cached_effective_target ppc_long_double_64bit {
+	check_runtime_nocache ppc_long_double_64bit {
+	    int main()
+	    {
+	      #ifndef _ARCH_PPC
+		return 1;
+	      #else
+		return sizeof (long double) != 64;
+	      #endif
+	    }
+	}
+    }]
+}
+
 # Return 1 if the target supports executing VSX instructions, 0
 # otherwise.  Cache the result.
 
@@ -7939,6 +7992,9 @@ proc is-effective-target { arg } {
 	  "power10_hw"     { set selected [check_power10_hw_available] }
 	  "ppc_float128_sw" { set selected [check_ppc_float128_sw_available] }
 	  "ppc_float128_hw" { set selected [check_ppc_float128_hw_available] }
+	  "ppc_long_double_ibm" { set selected [check_ppc_long_double_ibm] }
+	  "ppc_long_double_ieee" { set selected [check_ppc_long_double_ieee] }
+	  "ppc_long_double_64bit" { set selected [check_ppc_long_double_64bit] }
 	  "ppc_recip_hw"   { set selected [check_ppc_recip_hw_available] }
 	  "ppc_cpu_supports_hw" { set selected [check_ppc_cpu_supports_hw_available] }
 	  "ppc_mma_hw"     { set selected [check_ppc_mma_hw_available] }
-- 
2.22.0


-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.ibm.com, phone: +1 (978) 899-4797

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 2/3] PowerPC: require IBM long double for pr70117.
  2020-11-21  5:22 [PATH 0/3] Updated PowerPC tests for long double Michael Meissner
  2020-11-21  5:33 ` [PATCH 1/3] PowerPC: Add long double target-supports Michael Meissner
@ 2020-11-21  5:37 ` Michael Meissner
  2020-11-21 15:46   ` David Edelsohn
  2020-11-23 20:55   ` Segher Boessenkool
  2020-11-21  5:39 ` [PATCH 3/3] PowerPC: Require IBM long double for conversion test Michael Meissner
  2 siblings, 2 replies; 11+ messages in thread
From: Michael Meissner @ 2020-11-21  5:37 UTC (permalink / raw)
  To: Michael Meissner, gcc-patches, Segher Boessenkool,
	David Edelsohn, Bill Schmidt, Peter Bergner

PowerPC: require IBM long double for pr70117.

Since the test is explicitly checking for IBM extended double, do not try to
run it when long double is IEEE 128-bit.

I have tested this patch and the first patch in the series on a little endian
power9 system with 3 compilers that have the 3 different long double types
configured.  I verified that this test is listed as unsupported if long double
is not IBM 128-bit, and it passes if long double is IBM 128-bit.

Can I check this patch into the master branch?  After an appropriate soak-in
time, can I back port this patch to the previous open GCC trees?

gcc/testsuite/
2020-11-21  Michael Meissner  <meissner@linux.ibm.com>

	PR target/70117
	* gcc.target/powerpc/pr70117.c: Only run the test if long double
	uses the IBM extended double format.
---
 gcc/testsuite/gcc.target/powerpc/pr70117.c | 22 ++++------------------
 1 file changed, 4 insertions(+), 18 deletions(-)

diff --git a/gcc/testsuite/gcc.target/powerpc/pr70117.c b/gcc/testsuite/gcc.target/powerpc/pr70117.c
index 3bbd2c595e0..2077d15afd4 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr70117.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr70117.c
@@ -1,26 +1,12 @@
-/* { dg-do run { target { powerpc*-*-linux* powerpc*-*-darwin* powerpc*-*-aix* rs6000-*-* } } } */
-/* { dg-options "-std=c99 -mlong-double-128 -O2" } */
+/* { dg-require-effective-target ppc_long_double_ibm } */
+/* { dg-options "-std=c99 -O2" } */
 
 #include <float.h>
 
-#if defined(__LONG_DOUBLE_IEEE128__)
-/* If long double is IEEE 128-bit, we need to use the __ibm128 type instead of
-   long double.  We can't use __ibm128 on systems that don't support IEEE
-   128-bit floating point, because the type is not enabled on those
-   systems.  */
-#define LDOUBLE __ibm128
-
-#elif defined(__LONG_DOUBLE_IBM128__)
-#define LDOUBLE long double
-
-#else
-#error "long double must be either IBM 128-bit or IEEE 128-bit"
-#endif
-
 union gl_long_double_union
 {
   struct { double hi; double lo; } dd;
-  LDOUBLE ld;
+  long double ld;
 };
 
 /* This is gnulib's LDBL_MAX which, being 107 bits in precision, is
@@ -36,7 +22,7 @@ volatile double dnan = 0.0/0.0;
 int
 main (void)
 {
-  LDOUBLE ld;
+  long double ld;
 
   ld = gl_LDBL_MAX.ld;
   if (__builtin_isinf (ld))
-- 
2.22.0


-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.ibm.com, phone: +1 (978) 899-4797

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 3/3] PowerPC: Require IBM long double for conversion test.
  2020-11-21  5:22 [PATH 0/3] Updated PowerPC tests for long double Michael Meissner
  2020-11-21  5:33 ` [PATCH 1/3] PowerPC: Add long double target-supports Michael Meissner
  2020-11-21  5:37 ` [PATCH 2/3] PowerPC: require IBM long double for pr70117 Michael Meissner
@ 2020-11-21  5:39 ` Michael Meissner
  2020-11-23 21:23   ` Segher Boessenkool
  2 siblings, 1 reply; 11+ messages in thread
From: Michael Meissner @ 2020-11-21  5:39 UTC (permalink / raw)
  To: Michael Meissner, gcc-patches, Segher Boessenkool,
	David Edelsohn, Bill Schmidt, Peter Bergner

PowerPC: Require 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.

I have tested this patch, and the first patch in the series on a little endian
power9 computer running Linux, and I verified that if long double is not IBM
128-bit, the test is listed as UNSUPPORTED, and if long double is IBM 128-bit,
the test passes.

Can I check this into the master branch?  After an appropriate soak in period,
I would like to back port this to the open GCC branches.

gcc/testsuite/
2020-11-21  Michael Meissner  <meissner@linux.ibm.com>

	* c-c++-common/dfp/convert-bfp-11.c: Require IBM 128-bit long
	double.
---
 gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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..8c970bb76db 100644
--- a/gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c
+++ b/gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c
@@ -1,4 +1,5 @@
-/* { dg-skip-if "" { ! "powerpc*-*-linux*" } } */
+/* { dg-require-effective-target dfp } */
+/* { dg-require-effective-target ppc_long_double_ibm } */
 
 /* Test decimal float conversions to and from IBM 128-bit long double. 
    Checks are skipped at runtime if long double is not 128 bits.
-- 
2.22.0


-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.ibm.com, phone: +1 (978) 899-4797

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] PowerPC: require IBM long double for pr70117.
  2020-11-21  5:37 ` [PATCH 2/3] PowerPC: require IBM long double for pr70117 Michael Meissner
@ 2020-11-21 15:46   ` David Edelsohn
  2020-11-22  6:31     ` Michael Meissner
  2020-11-23 20:55   ` Segher Boessenkool
  1 sibling, 1 reply; 11+ messages in thread
From: David Edelsohn @ 2020-11-21 15:46 UTC (permalink / raw)
  To: Michael Meissner, GCC Patches, Segher Boessenkool,
	David Edelsohn, Bill Schmidt, Peter Bergner

On Sat, Nov 21, 2020 at 12:37 AM Michael Meissner
<meissner@linux.ibm.com> wrote:
>
> PowerPC: require IBM long double for pr70117.
>
> Since the test is explicitly checking for IBM extended double, do not try to
> run it when long double is IEEE 128-bit.
>
> I have tested this patch and the first patch in the series on a little endian
> power9 system with 3 compilers that have the 3 different long double types
> configured.  I verified that this test is listed as unsupported if long double
> is not IBM 128-bit, and it passes if long double is IBM 128-bit.
>
> Can I check this patch into the master branch?  After an appropriate soak-in
> time, can I back port this patch to the previous open GCC trees?
>
> gcc/testsuite/
> 2020-11-21  Michael Meissner  <meissner@linux.ibm.com>
>
>         PR target/70117
>         * gcc.target/powerpc/pr70117.c: Only run the test if long double
>         uses the IBM extended double format.
> ---
>  gcc/testsuite/gcc.target/powerpc/pr70117.c | 22 ++++------------------
>  1 file changed, 4 insertions(+), 18 deletions(-)
>
> diff --git a/gcc/testsuite/gcc.target/powerpc/pr70117.c b/gcc/testsuite/gcc.target/powerpc/pr70117.c
> index 3bbd2c595e0..2077d15afd4 100644
> --- a/gcc/testsuite/gcc.target/powerpc/pr70117.c
> +++ b/gcc/testsuite/gcc.target/powerpc/pr70117.c
> @@ -1,26 +1,12 @@
> -/* { dg-do run { target { powerpc*-*-linux* powerpc*-*-darwin* powerpc*-*-aix* rs6000-*-* } } } */
> -/* { dg-options "-std=c99 -mlong-double-128 -O2" } */
> +/* { dg-require-effective-target ppc_long_double_ibm } */
> +/* { dg-options "-std=c99 -O2" } */

Mike,

You still need a

/* { dg-do run } */

line.  But without any target specified.

Segher may have other comments.

Thanks, David

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] PowerPC: require IBM long double for pr70117.
  2020-11-21 15:46   ` David Edelsohn
@ 2020-11-22  6:31     ` Michael Meissner
  0 siblings, 0 replies; 11+ messages in thread
From: Michael Meissner @ 2020-11-22  6:31 UTC (permalink / raw)
  To: David Edelsohn
  Cc: Michael Meissner, GCC Patches, Segher Boessenkool, Bill Schmidt,
	Peter Bergner

On Sat, Nov 21, 2020 at 10:46:45AM -0500, David Edelsohn wrote:
> On Sat, Nov 21, 2020 at 12:37 AM Michael Meissner
> <meissner@linux.ibm.com> wrote:
> >
> > PowerPC: require IBM long double for pr70117.
> >
> > Since the test is explicitly checking for IBM extended double, do not try to
> > run it when long double is IEEE 128-bit.
> >
> > I have tested this patch and the first patch in the series on a little endian
> > power9 system with 3 compilers that have the 3 different long double types
> > configured.  I verified that this test is listed as unsupported if long double
> > is not IBM 128-bit, and it passes if long double is IBM 128-bit.
> >
> > Can I check this patch into the master branch?  After an appropriate soak-in
> > time, can I back port this patch to the previous open GCC trees?
> >
> > gcc/testsuite/
> > 2020-11-21  Michael Meissner  <meissner@linux.ibm.com>
> >
> >         PR target/70117
> >         * gcc.target/powerpc/pr70117.c: Only run the test if long double
> >         uses the IBM extended double format.
> > ---
> >  gcc/testsuite/gcc.target/powerpc/pr70117.c | 22 ++++------------------
> >  1 file changed, 4 insertions(+), 18 deletions(-)
> >
> > diff --git a/gcc/testsuite/gcc.target/powerpc/pr70117.c b/gcc/testsuite/gcc.target/powerpc/pr70117.c
> > index 3bbd2c595e0..2077d15afd4 100644
> > --- a/gcc/testsuite/gcc.target/powerpc/pr70117.c
> > +++ b/gcc/testsuite/gcc.target/powerpc/pr70117.c
> > @@ -1,26 +1,12 @@
> > -/* { dg-do run { target { powerpc*-*-linux* powerpc*-*-darwin* powerpc*-*-aix* rs6000-*-* } } } */
> > -/* { dg-options "-std=c99 -mlong-double-128 -O2" } */
> > +/* { dg-require-effective-target ppc_long_double_ibm } */
> > +/* { dg-options "-std=c99 -O2" } */
> 
> Mike,
> 
> You still need a
> 
> /* { dg-do run } */
> 
> line.  But without any target specified.
> 
> Segher may have other comments.
> 
> Thanks, David

Thanks.

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.ibm.com, phone: +1 (978) 899-4797

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/3] PowerPC: Add long double target-supports.
  2020-11-21  5:33 ` [PATCH 1/3] PowerPC: Add long double target-supports Michael Meissner
@ 2020-11-23 20:28   ` Segher Boessenkool
  2020-11-24 21:44     ` Michael Meissner
  0 siblings, 1 reply; 11+ messages in thread
From: Segher Boessenkool @ 2020-11-23 20:28 UTC (permalink / raw)
  To: Michael Meissner, gcc-patches, David Edelsohn, Bill Schmidt,
	Peter Bergner

Hi!

On Sat, Nov 21, 2020 at 12:33:52AM -0500, Michael Meissner wrote:
> +# See if the target is a powerpc with the long double format that uses the IBM
> +# extended double format.

"Return 1 if the target is PowerPC, and long double is IBM extended double."

> @@ -7939,6 +7992,9 @@ proc is-effective-target { arg } {
>  	  "power10_hw"     { set selected [check_power10_hw_available] }
>  	  "ppc_float128_sw" { set selected [check_ppc_float128_sw_available] }
>  	  "ppc_float128_hw" { set selected [check_ppc_float128_hw_available] }
> +	  "ppc_long_double_ibm" { set selected [check_ppc_long_double_ibm] }
> +	  "ppc_long_double_ieee" { set selected [check_ppc_long_double_ieee] }
> +	  "ppc_long_double_64bit" { set selected [check_ppc_long_double_64bit] }
>  	  "ppc_recip_hw"   { set selected [check_ppc_recip_hw_available] }
>  	  "ppc_cpu_supports_hw" { set selected [check_ppc_cpu_supports_hw_available] }
>  	  "ppc_mma_hw"     { set selected [check_ppc_mma_hw_available] }

Why this?  It just defines aliases to the exact same name?


Segher

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] PowerPC: require IBM long double for pr70117.
  2020-11-21  5:37 ` [PATCH 2/3] PowerPC: require IBM long double for pr70117 Michael Meissner
  2020-11-21 15:46   ` David Edelsohn
@ 2020-11-23 20:55   ` Segher Boessenkool
  1 sibling, 0 replies; 11+ messages in thread
From: Segher Boessenkool @ 2020-11-23 20:55 UTC (permalink / raw)
  To: Michael Meissner, gcc-patches, David Edelsohn, Bill Schmidt,
	Peter Bergner

Hi!

On Sat, Nov 21, 2020 at 12:37:10AM -0500, Michael Meissner wrote:
> Since the test is explicitly checking for IBM extended double, do not try to
> run it when long double is IEEE 128-bit.

Before your change, it would explicitly use __ibm128 if that is not the
same as long double.

You need a better explanation / justification for the patch.

What goes wrong without the patch?  Is that to be expected?  Etc.

You get less coverage than before after this patch (it will now only run
on systems that have double-double as long double).


Segher

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3] PowerPC: Require IBM long double for conversion test.
  2020-11-21  5:39 ` [PATCH 3/3] PowerPC: Require IBM long double for conversion test Michael Meissner
@ 2020-11-23 21:23   ` Segher Boessenkool
  0 siblings, 0 replies; 11+ messages in thread
From: Segher Boessenkool @ 2020-11-23 21:23 UTC (permalink / raw)
  To: Michael Meissner, gcc-patches, David Edelsohn, Bill Schmidt,
	Peter Bergner

On Sat, Nov 21, 2020 at 12:39:53AM -0500, Michael Meissner wrote:
> 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.

> 2020-11-21  Michael Meissner  <meissner@linux.ibm.com>
> 
> 	* c-c++-common/dfp/convert-bfp-11.c: Require IBM 128-bit long
> 	double.

Okay for trunk (and backports later).  Thanks!


Segher

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/3] PowerPC: Add long double target-supports.
  2020-11-23 20:28   ` Segher Boessenkool
@ 2020-11-24 21:44     ` Michael Meissner
  2020-11-24 23:49       ` Segher Boessenkool
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Meissner @ 2020-11-24 21:44 UTC (permalink / raw)
  To: Segher Boessenkool
  Cc: Michael Meissner, gcc-patches, David Edelsohn, Bill Schmidt,
	Peter Bergner

On Mon, Nov 23, 2020 at 02:28:57PM -0600, Segher Boessenkool wrote:
> Hi!
> 
> On Sat, Nov 21, 2020 at 12:33:52AM -0500, Michael Meissner wrote:
> > +# See if the target is a powerpc with the long double format that uses the IBM
> > +# extended double format.
> 
> "Return 1 if the target is PowerPC, and long double is IBM extended double."
> 
> > @@ -7939,6 +7992,9 @@ proc is-effective-target { arg } {
> >  	  "power10_hw"     { set selected [check_power10_hw_available] }
> >  	  "ppc_float128_sw" { set selected [check_ppc_float128_sw_available] }
> >  	  "ppc_float128_hw" { set selected [check_ppc_float128_hw_available] }
> > +	  "ppc_long_double_ibm" { set selected [check_ppc_long_double_ibm] }
> > +	  "ppc_long_double_ieee" { set selected [check_ppc_long_double_ieee] }
> > +	  "ppc_long_double_64bit" { set selected [check_ppc_long_double_64bit] }
> >  	  "ppc_recip_hw"   { set selected [check_ppc_recip_hw_available] }
> >  	  "ppc_cpu_supports_hw" { set selected [check_ppc_cpu_supports_hw_available] }
> >  	  "ppc_mma_hw"     { set selected [check_ppc_mma_hw_available] }
> 
> Why this?  It just defines aliases to the exact same name?

If you remove those lines you get the failure from the default case:

	  default          { error "unknown effective target keyword `$arg'" }

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.ibm.com, phone: +1 (978) 899-4797

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/3] PowerPC: Add long double target-supports.
  2020-11-24 21:44     ` Michael Meissner
@ 2020-11-24 23:49       ` Segher Boessenkool
  0 siblings, 0 replies; 11+ messages in thread
From: Segher Boessenkool @ 2020-11-24 23:49 UTC (permalink / raw)
  To: Michael Meissner, gcc-patches, David Edelsohn, Bill Schmidt,
	Peter Bergner

On Tue, Nov 24, 2020 at 04:44:19PM -0500, Michael Meissner wrote:
> On Mon, Nov 23, 2020 at 02:28:57PM -0600, Segher Boessenkool wrote:
> > On Sat, Nov 21, 2020 at 12:33:52AM -0500, Michael Meissner wrote:
> > > +# See if the target is a powerpc with the long double format that uses the IBM
> > > +# extended double format.
> > 
> > "Return 1 if the target is PowerPC, and long double is IBM extended double."
> > 
> > > @@ -7939,6 +7992,9 @@ proc is-effective-target { arg } {
> > >  	  "power10_hw"     { set selected [check_power10_hw_available] }
> > >  	  "ppc_float128_sw" { set selected [check_ppc_float128_sw_available] }
> > >  	  "ppc_float128_hw" { set selected [check_ppc_float128_hw_available] }
> > > +	  "ppc_long_double_ibm" { set selected [check_ppc_long_double_ibm] }
> > > +	  "ppc_long_double_ieee" { set selected [check_ppc_long_double_ieee] }
> > > +	  "ppc_long_double_64bit" { set selected [check_ppc_long_double_64bit] }
> > >  	  "ppc_recip_hw"   { set selected [check_ppc_recip_hw_available] }
> > >  	  "ppc_cpu_supports_hw" { set selected [check_ppc_cpu_supports_hw_available] }
> > >  	  "ppc_mma_hw"     { set selected [check_ppc_mma_hw_available] }
> > 
> > Why this?  It just defines aliases to the exact same name?
> 
> If you remove those lines you get the failure from the default case:
> 
> 	  default          { error "unknown effective target keyword `$arg'" }

So name the functions check_effective_target_ppc_long_double_ibm etc.?
Then it is all handled by the generic code, and yes you can use these
same names in the testcases.


Segher

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-11-24 23:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-21  5:22 [PATH 0/3] Updated PowerPC tests for long double Michael Meissner
2020-11-21  5:33 ` [PATCH 1/3] PowerPC: Add long double target-supports Michael Meissner
2020-11-23 20:28   ` Segher Boessenkool
2020-11-24 21:44     ` Michael Meissner
2020-11-24 23:49       ` Segher Boessenkool
2020-11-21  5:37 ` [PATCH 2/3] PowerPC: require IBM long double for pr70117 Michael Meissner
2020-11-21 15:46   ` David Edelsohn
2020-11-22  6:31     ` Michael Meissner
2020-11-23 20:55   ` Segher Boessenkool
2020-11-21  5:39 ` [PATCH 3/3] PowerPC: Require IBM long double for conversion test Michael Meissner
2020-11-23 21:23   ` Segher Boessenkool

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).