> I see, so we can test the code generation in the testsuite even if the
> compiler was built against an assembler without support for the
> instructions.
At least partially, yes.
> But in such a case, I'm unsure if I understand why i386.exp needs
> these tests at all. The presence of support for a particular i386
> intrinsic is an implicit property of the gcc sources that these test
> cases are a part of.
>
> If the tests are properly added only once the code to support the i386
> intrinsic is added as well, the checks seem superfluous.
The check is an _object_ check, for example:
proc check_effective_target_sse4 { } {
return [check_no_compiler_messages sse4.1 object {
so it checks that an object file can be produced. You indeed don't need to
invoke the check via the sse4.1 tag if you use:
/* { dg-do compile } */
in your tests, but you do need the sse4.1 tag if you use:
/* { dg-do assemble } */
or
/* { dg-do run } */
So the first category of tests will always be executed, whereas the latter two
will only be executed if you have the binutils support.
--
Eric Botcazou