On Mon, Aug 26, 2019 at 05:48:08PM -0400, Michael Meissner wrote: > This patch contains the miscellaneous tests for GCC to test some features of > --- gcc/testsuite/gcc.target/powerpc/paddi-1.c (revision 274879) > +++ gcc/testsuite/gcc.target/powerpc/paddi-1.c (working copy) > @@ -0,0 +1,12 @@ > +/* { dg-do compile { target { powerpc*-*-* } } } */
Everything in gcc.target/powerpc implicitly has this. You may want /* { dg-do compile } */ for documentation value, or simply because it is nicely symmetric if you also have run tests, but there is no need for the target clause. > +/* { dg-require-effective-target powerpc_future_ok } */ Why does this test return false if not on linux? That doesn't make much sense. A user can select -mcpu=future whatever OS he is on. We probably want a test saying if there is prefixed addressing, or the like, instead? > +/* { dg-options "-O2 -mdejagnu-cpu=future" } */ > --- gcc/testsuite/gcc.target/powerpc/prefix-odd-memory.c (revision > 274879) > +++ gcc/testsuite/gcc.target/powerpc/prefix-odd-memory.c (working copy) > @@ -0,0 +1,156 @@ > +/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */ All of these except the ld and std and lwa should work on -m32 as well, right? > +long > +load_si_odd (unsigned char *p) > +{ > + return *(int *)(p + 1); /* should generate PLWA. */ > +} > + > +unsigned long > +load_ul_odd (unsigned char *p) > +{ > + return *(unsigned long *)(p + 1); /* should generate PLD. */ > +} > + > +long > +load_sl_odd (unsigned char *p) > +{ > + return *(long *)(p + 1); /* should generate PLD. */ > +} > +void > +store_ul_odd (unsigned long ul, unsigned char *p) > +{ > + *(unsigned long *)(p + 1) = ul; /* should generate PSTD. */ > +} > + > +void > +store_sl_odd (signed long sl, unsigned char *p) > +{ > + *(signed long *)(p + 1) = sl; /* should generate PSTD. */ > +} > +void > +store_double_odd (double d, unsigned char *p) > +{ > + *(double *)(p + 1) = d; /* should generate STD. */ > +} (PSTFD?) So put an #if around those? > +/* { dg-final { scan-assembler-times {\mpld\M} 2 } } */ > +/* { dg-final { scan-assembler-times {\mplwa\M} 1 } } */ > +/* { dg-final { scan-assembler-times {\mpstd\M} 2 } } */ And conditions on these. Right now this all is only supported on powerpc64le-linux, but it won't stay that way. I'm not looking forward to having to change all the tests, let's try to test for support of the actual feature we need, instead. Segher