On Mon, Jun 29, 2020 at 01:42:56PM -0500, Segher Boessenkool wrote: > Hi! > > On Mon, Jun 29, 2020 at 02:23:22PM -0400, Michael Meissner wrote: > > --- /dev/null > > +++ b/gcc/testsuite/gcc.target/powerpc/prefix-di-constant.c > > @@ -0,0 +1,13 @@ > > +/* { dg-do compile } */ > > +/* { dg-require-effective-target powerpc_prefixed_addr } */ > > +/* { dg-require-effective-target lp64 } */ > > Please always say (_in the test_) why something is required, if it isn't > obvious. > > > +/* { dg-options "-O2 -mdejagnu-cpu=power10" } */ > > + > > +/* Test that PLI (PADDI) is generated to load a large constant. */ > > +unsigned long long > > +large (void) > > +{ > > + return 0x12345678ULL; > > +} > > + > > +/* { dg-final { scan-assembler {\mpli\M} } } */ > > I have no idea why 64-bit mode (or 64-bit addressing) is needed here. > *Is* it needed?
Yes it is needed. Otherwise two separate load immediates would be needed to load each part of the DI constant that is held in 2 registers. > > --- /dev/null > > +++ b/gcc/testsuite/gcc.target/powerpc/prefix-ds-dq.c > > @@ -0,0 +1,161 @@ > > +/* { dg-do compile } */ > > +/* { dg-require-effective-target powerpc_prefixed_addr } */ > > +/* { dg-require-effective-target lp64 } */ > > +/* { dg-options "-O2 -mdejagnu-cpu=power10" } */ > > > + unsigned int si; /* offset 49 bytes. */ > > > +int > > +load_si (struct packed_struct *p) > > +{ > > + return p->si; /* PLWA 3,49(3). */ > > +} > > Here it is because this would be just lwz on 32-bit. > > But that is the only difference, so you could just make that single test > conditional, not the whole file. > > > --- /dev/null > > +++ b/gcc/testsuite/gcc.target/powerpc/prefix-no-update.c > > @@ -0,0 +1,51 @@ > > +/* { dg-do compile } */ > > +/* { dg-require-effective-target powerpc_prefixed_addr } */ > > +/* { dg-require-effective-target lp64 } */ > > +/* { dg-options "-O2 -mdejagnu-cpu=power10" } */ > > For this testcase, I have no idea at all why you want lp64? Becuase to show the bug you need a stack frame larger than 64K. -- Michael Meissner, IBM IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA email: meiss...@linux.ibm.com, phone: +1 (978) 899-4797