This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [testsuite] Check for 3dnow, sse3, sse2 in i386 target assembler
On 05/18/2010 02:04 PM, Rainer Orth wrote:
> [Hundreds of lines of ChangeLog entry deleted ;-)]
>
>> Ugh...
>
> Indeed :-)
>
>>> +# Return 1 if 3dnow instructions can be compiled.
>>> +proc check_effective_target_3dnow { } {
>>> + return [check_no_compiler_messages 3dnow object {
>>> + void _m_femms (void)
>>> + {
>>> + __builtin_ia32_femms();
>>> + }
>>> + } "-O2 -m3dnow" ]
>>> +}
>>
>> Please use a more representative insn for 3dNOW test here, perhaps
>> __builtin_ia32_pfadd.
>
> Will do.
>
>>> /* { dg-do compile } */
>>> /* This test checks for absolute memory operands. */
>>> /* { dg-require-effective-target nonpic } */
>>> +/* { dg-require-effective-target sse2 } */
>>
>> Can these dg-require-effective-target directives be merged into one {
>> nonpic && sse2 } condition?
>
> Unfortunately not: while doc/sourcebuild.texi doesn't state this
> explicitly, testsuite/lib/target-supports-dg.exp has this:
>
> set args [lreplace $args 0 0]
> if { [llength $args] != 1 } {
> error "syntax error, need a single effective-target keyword"
> }
>
>>> /* PR rtl-optimization/16104 */
>>> /* { dg-do run { target i?86-*-* x86_64-*-* } } */
>>> /* { dg-options "-msse2" } */
>>> +/* { dg-require-effective-target sse2 } */
>>
>> also in above example, { { target .... } && sse2 }.
>>
>> (and all similar constructs through the patch).
>
> I could do this, but perhaps it would be good to stick to the
> dg-require-effective-target sse2 form throughout for consistency?
Well, it is only my opinion, I don't care that much for this form.
The patch is OK then.
Thanks,
Uros.