On Mon, 2020-04-27 at 16:04 -0400, Michael Meissner via Gcc-patches wrote: > This patch adds a test for the case where we have prefixed load/store > instructions, a large stack frame, and stack checking is enabled. > > This is patch #7 of 7. I have checked this patch on a little endian power8 > system running Linux, and the test passed. Can I check this into the GCC 10 > trunk? > > 2020-04-27 Michael Meissner <meiss...@linux.ibm.com> > > * gcc.target/powerpc/prefix-stack-protect.c: New test to make sure > -fstack-protect-strong works with prefixed addressing. > > --- /tmp/OxuBEg_prefix-stack-protect.c 2020-04-27 14:12:53.883004507 > -0400 > +++ gcc/testsuite/gcc.target/powerpc/prefix-stack-protect.c 2020-04-27 > 14:12:53.706006931 -0400 > @@ -0,0 +1,20 @@ > +/* { dg-do compile } */ > +/* { dg-require-effective-target powerpc_prefixed_addr } */ > +/* { dg-options "-O2 -mdejagnu-cpu=future -fstack-protector-strong" } */ > + > +/* Test that we can handle large stack frames with -fstack-protector-strong > and > + prefixed addressing. This was originally discovered in trying to build
s/in/when/ > + glibc with -mcpu=future, and vfwprintf.c failed because it used > + -fstack-protector-strong. */ > + > +extern long foo (char *); > + > +long > +bar (void) > +{ > + char buffer[0x20000]; > + return foo (buffer) + 1; > +} > + > +/* { dg-final { scan-assembler {\mpld\M} } } */ > +/* { dg-final { scan-assembler {\mpstd\M} } } */ > lgtm, thanks, -Will