This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch to skip some more tests for x86 -m64


On Sat, 2 Apr 2005, Mark Mitchell wrote:

> Andreas Jaeger wrote:
> 
> > > { dg-require-effective-target ilp32 }
> 
> I too think that is current accepted best practice.  (It may be that the tests
> are just skipped on a system which uses -m64 by default; I'm not sure if it
> actually appends -m32 to run them that way.  However, that's still probably
> OK; what you really want on such a system is to test with
> --target_board=unix{-m32,-m64} so that you test both compilation modes, and
> the test only needs to be run in one of the modes.)

I'll prepare a revised patch using { dg-require-effective-target ilp32 } 
for those tests which should simply be skipped in 64-bit mode (leaving 
those which should run in both modes but with special options only for 
32-bit x86 using { target { i?86-*-* && ilp32 } } in place of the present 
{ target i?86-*-* } on the dg-options line).

In principle all the x86 and x86_64 tests should operate on both i?86 and 
x86_64, with dg-require-effective-target so they only run in the right 
multilib mode.  Perhaps we need "x86", "x86_ilp32" and "x86_lp64" target 
keywords to make this simple to specify?  As is we have tests such as 
short-compare-1.c which hardcode -m32 on x86_64 and so fail on 
--disable-multilib builds; we should simply assume there that users 
wanting to do 32-bit tests on x86_64 will use --target_board as you say to 
test the desired multilibs and disable that test for 64-bit mode.  I'd 
prefer that test to say

/* { dg-options "-O -mtune=i686" { target x86_ilp32 } } */

and e.g. i386-unroll-1.c to say

/* { dg-do run { target x86_ilp32 } } */

if only on the grounds that the simpler the necessary boilerplate, the 
more likely it is that tests will consistently allow running on all 
targets on which they should work.

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    joseph@codesourcery.com (CodeSourcery mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]