On Thu, Nov 14, 2019 at 07:24:15PM -0500, Michael Meissner wrote:
> This patch adds tests for using the PC-relative addressing on the 'future'
> system.
> * gcc/testsuite/gcc.target/powerpc/prefix-pcrel.h: New set of
> tests to test prefixed addressing on 'future' system with
> PC-relative tests.
This is one file, it is not a "set". Just say "New file."?
> --- /tmp/79Y8V6_prefix-pcrel-dd.c 2019-11-13 17:43:34.462087329 -0500
> +++ gcc/testsuite/gcc.target/powerpc/prefix-pcrel-dd.c 2019-11-13
> 17:43:34.183084816 -0500
> @@ -0,0 +1,13 @@
> +/* { dg-do compile } */
> +/* { dg-require-effective-target powerpc_pcrel_ok } */
> +/* { dg-options "-O2 -mdejagnu-cpu=future" } */
> +
> +/* Tests for prefixed instructions testing whether pc-relative prefixed
> + instructions are generated for SImode. */
This is DDmode.
> --- /tmp/BalpdH_prefix-pcrel-kf.c 2019-11-13 17:43:34.494087617 -0500
> +++ gcc/testsuite/gcc.target/powerpc/prefix-pcrel-kf.c 2019-11-13
> 17:43:34.205085014 -0500
> @@ -0,0 +1,13 @@
> +/* { dg-do compile } */
> +/* { dg-require-effective-target powerpc_pcrel_ok } */
> +/* { dg-options "-O2 -mdejagnu-cpu=future" } */
> +
> +/* Tests for prefixed instructions testing whether pc-relative prefixed
> + instructions are generated for KFmode. */
> +
> +#define TYPE __float128
So use __ieee128, instead?
This will be *first* supported on powerpc64le-linux only, sure.
> --- /tmp/74AMuu_prefix-pcrel-sd.c 2019-11-13 17:43:34.509087752 -0500
> +++ gcc/testsuite/gcc.target/powerpc/prefix-pcrel-sd.c 2019-11-13
> 17:43:34.215085104 -0500
> @@ -0,0 +1,12 @@
> +/* { dg-do compile } */
> +/* { dg-require-effective-target powerpc_pcrel_ok } */
> +/* { dg-options "-O2 -mdejagnu-cpu=future" } */
> +
> +/* Tests for prefixed instructions testing whether pc-relative prefixed
> + instructions are generated for SImode. */
SDmode.
> +typedef signed char schar;
> +typedef unsigned char uchar;
> +typedef unsigned short ushort;
> +typedef unsigned int uint;
> +typedef unsigned long ulong;
> +typedef long double ldouble;
> +typedef vector double v2df;
> +typedef vector long v2di;
> +typedef vector float v4sf;
> +typedef vector int v4si;
> +
> +#ifndef TYPE
> +#define TYPE ulong
> +#endif
Same comment as before.
> +#if DO_VALUE
> +OTYPE
> +value (void)
> +{
> + return (OTYPE)a;
> +}
> +#endif
> +
> +#if DO_SET
> +void
> +set (ITYPE b)
> +{
> + a = (TYPE)b;
> +}
> +#endif
The casts here are not needed, and will only make problems harder to find?
Segher