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: [testsuite] skip ARM tests if no thumb2 support


On 06/15/2011 01:13 AM, Ramana Radhakrishnan wrote:
> On 14 June 2011 21:35, Janis Johnson <janisjo@codesourcery.com> wrote:
>> These tests apparently require thumb2 support (I don't yet know much
>> about ARM).  OK for trunk, and later 4.6?
> 
> OK - The -march=armv7-a is redundant in these tests. You should be
> able to lose them if arm_thumb2_ok returns true.

That brings up an important point.  Without any changes, this test
passes scan-assembler when run with multilibs that don't override the
-march= option, but fails the scan when -march from multilibs
overrides the one from dg-options and doesn't support thumb2.  With
"dg-require-effective-target arm_thumb2_ok" the test is skipped for
multilibs that don't support thumb2, including those that default to an
arch that doesn't support it.

If we want this and similar tests to continue to be run for default
multilibs with default support for older values of -march then instead
of using ""dg-require-effective-target arm_thumb2_ok" the test can skip
multilibs that use -march that don't support thumb2, e.g.

/* { dg-skip-if "need thumb2" { arm*-*-* } { "-march=*" } { "-march=armv6t2" "-march=armv[7-9]*" "-march=armv[1-9][0-9]*" } } */

In summary, the choice for a test like this is:

1. Provide options needed to test particular functionality, and skip the
   test if multilib flags that override those options would not test the
   relevant functionality.
2. Skip the test if multilib options on their own do not provide the
   functionality that the test covers.

Option 2 assumes that there is enough test coverage for later arch
versions, either with default support or multilib options.  This choice
applies to several tests in gcc.target/arm.

Janis


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