[PATCH, GAS/ARM] Fix selected_cpu with default CPU and -mcpu

Thomas Preudhomme thomas.preudhomme@foss.arm.com
Thu Mar 30 16:42:00 GMT 2017


On 30/03/17 17:28, Nick Clifton wrote:
> Hi Thomas,
>
>> I started to look into that but it seems that the only way to skip a
>> test is based on the target triplet which would be identical in both
>> case. Would a "require" mechanism makes sense where one could express
>> that a test need a feature FOO and the testsuite would call hasFOO
>> to check whether the feature is available?
>
> Do you mean in the sense of individual tests having requirements like
> some of the gcc testsuite cases (eg: /* { dg-require-effective-target default-cpu } */)
> or in the sense of the test driver (eg gas/arm/arm.exp) only running
> certain tests if another proc returned true ?

I meant the former but the latter works too. It just needs a discipline in the 
naming of the tests to distinguish which one really need autodetection which I 
think we already followed in the tests.

>
> The latter is already supported, (see for gas/testsuite/gas/cfi.exp), it
> would just mean that you would have to teach arm.exp about which tests
> should or should not be run when a default cpu is not specified.

Wonderful, I shall be able to use that indeed.

>
> For the former though I am not sure how much work would be involved.
> You could probably add a new directive to the run_dump_test proc which
> evaluates an expressions and only continues if the expression returns
> true.  My dejagnu-fu is not that great, but I think that that should
> work...

 From what I could see it doesn't look like an awful lot of work either but if 
there's already a mechanism in place there is no need to add something else I guess.

Best regards,

Thomas



More information about the Binutils mailing list