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] Check for 3dnow, sse3, sse2 in i386 target assembler


On Tue, May 18, 2010 at 6:33 PM, Uros Bizjak <ubizjak@gmail.com> 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.

Attached patch fixes wrong updated test for 3dnow assembler support.

2010-05-20  Uros Bizjak  <ubizjak@gmail.com>

	* gcc.target/i386/i386.exp (check_effective_target_3dnow):
	Fix test code.
	(check_effective_target_xop): Remove __may_alias__ attribute.

Patch was tested on x86_64-pc-linux-gnu, committed to mainline.

Uros.

Attachment: t.diff.txt
Description: Text document


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