Message ID | 51DB174D.7030605@mentor.com |
---|---|
State | New |
Headers | show |
On Jul 8, 2013, at 12:47 PM, Janis Johnson <janis_johnson@mentor.com> wrote: > Tests gcc.target/powerpc/20020118-1.c and > gcc.c-torture/execute/nest-align-1.c sometimes fail because they expect > a stack alignment that is greater than that required for powerpc-eabi. > This patch forces stack alignment to 128 bits by passing "-mno-eabi". > > Is this OK for mainline and the 4.8 branch, or would it be better to > skip these tests for powerpc-*-eabi*? I don't have a strong preference either way, I'd defer to someone with an opinion. I have a weak preference for additional testing, so I like the patch.
On 07/08/2013 09:47 PM, Janis Johnson wrote: > Tests gcc.target/powerpc/20020118-1.c and > gcc.c-torture/execute/nest-align-1.c sometimes fail because they expect > a stack alignment that is greater than that required for powerpc-eabi. > This patch forces stack alignment to 128 bits by passing "-mno-eabi". > > Is this OK for mainline and the 4.8 branch, or would it be better to > skip these tests for powerpc-*-eabi*? In case it can be fixed with an additional compiler option, then this is preferable for me since this will help also targets using the EABI, but don't match with the powerpc-*-eabi* pattern, e.g. powerpc-*-rtems*.
On Mon, Jul 8, 2013 at 3:47 PM, Janis Johnson <janis_johnson@mentor.com> wrote: > Tests gcc.target/powerpc/20020118-1.c and > gcc.c-torture/execute/nest-align-1.c sometimes fail because they expect > a stack alignment that is greater than that required for powerpc-eabi. > This patch forces stack alignment to 128 bits by passing "-mno-eabi". > > Is this OK for mainline and the 4.8 branch, or would it be better to > skip these tests for powerpc-*-eabi*? Both of the tests specifically are checking support for alignment, so passing -mno-eabi for powerpc-eabi seems to defeat the purpose. I would skip the 20020118-1.c test. It seems that nest-align-1.c should not fail, even with powerpc-eabi, so I think the testcase really is pointing to a problem. Thanks, David
Index: gcc.target/powerpc/20020118-1.c =================================================================== --- gcc.target/powerpc/20020118-1.c (revision 200621) +++ gcc.target/powerpc/20020118-1.c (working copy) @@ -1,6 +1,8 @@ /* { dg-do run { target powerpc*-*-* } }*/ /* VxWorks only guarantees 64 bits of alignment (STACK_BOUNDARY == 64). */ /* { dg-skip-if "" { "powerpc*-*-vxworks*" } { "*" } { "" } } */ +/* Force 128-bit stack alignment for eabi targets. */ +/* { dg-options "-mno-eabi" { target powerpc*-*-eabi* } } */ /* Test local alignment. Test new target macro STARTING_FRAME_PHASE. */ /* Origin: Aldy Hernandez <aldyh@redhat.com>. */ Index: gcc.c-torture/execute/nest-align-1.x =================================================================== --- gcc.c-torture/execute/nest-align-1.x (revision 0) +++ gcc.c-torture/execute/nest-align-1.x (revision 0) @@ -0,0 +1,5 @@ +# Force bigger stack alignment for PowerPC EABI targets. +if { [istarget "powerpc-*-eabi*"] } { + set additional_flags "-mno-eabi" +} +return 0