Message ID | 4E935366.3060700@mentor.com |
---|---|
State | New |
Headers | show |
On 10/10/2011 01:19 PM, Janis Johnson wrote: > Tests gcc.target/powerpc/warn-[12].c fail for soft-float multilibs with > the unexpected warning "-mvsx requires hardware floating point [enabled > by default]". This patch skips those tests for soft-float multilibs and > modifies the powerpc check for a soft-float effective target to return > true for either __NO_FPRS__ or _SOFT_FLOAT being defined. > > Is this OK for trunk? I must admit that I'm not sure what all those > Power float variants are for. On second thought these tests should use /* { dg-require-effective-target powerpc_vsx_ok } */ instead of requiring hard_float, and forget about the proposed change to effective target hard_float. Is that OK? Janis
On Oct 11, 2011, at 11:08 AM, Janis Johnson wrote: > On 10/10/2011 01:19 PM, Janis Johnson wrote: >> Tests gcc.target/powerpc/warn-[12].c fail for soft-float multilibs with >> the unexpected warning "-mvsx requires hardware floating point [enabled >> by default]". This patch skips those tests for soft-float multilibs and >> modifies the powerpc check for a soft-float effective target to return >> true for either __NO_FPRS__ or _SOFT_FLOAT being defined. >> >> Is this OK for trunk? I must admit that I'm not sure what all those >> Power float variants are for. > > On second thought these tests should use > > /* { dg-require-effective-target powerpc_vsx_ok } */ > > instead of requiring hard_float, and forget about the proposed > change to effective target hard_float. Is that OK? I was hoping a ppc person would chime in... Ok.
Index: gcc/testsuite/lib/target-supports.exp =================================================================== --- gcc/testsuite/lib/target-supports.exp (revision 179771) +++ gcc/testsuite/lib/target-supports.exp (working copy) @@ -792,6 +792,14 @@ }] } + if { [istarget powerpc*-*-*] } { + return [check_no_compiler_messages hard_float assembly { + #if (defined _SOFT_FLOAT || defined __NO_FPRS__) + #error FOO + #endif + }] + } + # This proc is actually checking the availabilty of FPU # support for doubles, so on the RX we must fail if the # 64-bit double multilib has been selected. Index: gcc/testsuite/gcc.target/powerpc/warn-1.c =================================================================== --- gcc/testsuite/gcc.target/powerpc/warn-1.c (revision 179771) +++ gcc/testsuite/gcc.target/powerpc/warn-1.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile { target { powerpc*-*-* } } } */ +/* { dg-require-effective-target hard_float } */ /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ /* { dg-options "-O -mvsx -mno-altivec" } */ Index: gcc/testsuite/gcc.target/powerpc/warn-2.c =================================================================== --- gcc/testsuite/gcc.target/powerpc/warn-2.c (revision 179771) +++ gcc/testsuite/gcc.target/powerpc/warn-2.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile { target { powerpc*-*-* } } } */ +/* { dg-require-effective-target hard_float } */ /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ /* { dg-options "-O -mcpu=power7 -mno-altivec" } */