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: PATCH: Add SSE4.1 testcases


On Tue, May 22, 2007 at 08:48:18AM +0200, Uros Bizjak wrote:
> Hello!
> 
> >This patch adds SSE4.1 testcases for all SSE4.1 defititions. I added
> >an assembler test for SSE4 support and skipped those tests if assembler
> >doesn't support SSE4. Tested on Linux/ia32 and Linux/intel64. This
> >patch needs the SSE4 support:
> 
> I'd like to propose a different test approach.
> Currently we conditionally compile tests with:
> 
> +/* { dg-do run { target i?86-*-* x86_64-*-* } } */
> +/* { dg-options "-O2 -msse4.1" } */
> +
> +#include "sse4_1-check.h"
> +
> +#if HAVE_AS_IX86_SSE4
> +#include <smmintrin.h>
> +#include <string.h>
> 
> However, the check for sse4.1 asm support should be implemented in
> testuite/lib/target-supports.exp, perhaps something like:
> 
> proc check_effective_target_sse41

It should be

proc check_effective_target_sse4

since SSE4.1/4.2 was announced at the same time. Their assembler
support is added together. Tests will check SSE4 support in hardware
at run time. There is no need to check asssembler support for SSE4.1
and SSE4.2 separately.

> 
> using
> 
>    return [check_no_compiler_messages sse41 object {...}
> 
> Then these testcases could use:
> 
> /* { dg-do run { target i?86-*-* x86_64-*-* } } */
> /* { dg-require-effective-target sse41 } */
> 
> Also, please do not add new headers:
> 
> +#include "sse4_1-check.h"
> 
> but use i386-cpuid.h directly with a runtime feature test in main,
> like it is used in ssse3-* and sse4a-* tests.

That will duplicate lots of codes. What is the advantage for this
approach?

> 
> -/* Define to 1 to enable decimal float extension to C. */
> +/* Define to 1 to specify that we are using the BID decimal floating point
> +   format instead of DPD */
> #ifndef USED_FOR_TARGET
> -#undef ENABLE_DECIMAL_FLOAT
> +#undef ENABLE_DECIMAL_BID_FORMAT
> #endif
> 
> 
> -/* Define to 1 to say we are using the BID decimal format */
> +/* Define to 1 to enable decimal float extension to C. */
> #ifndef USED_FOR_TARGET
> -#undef ENABLE_DECIMAL_BID_FORMAT
> +#undef ENABLE_DECIMAL_FLOAT
> #endif
> 
> The above is not intended to be in this patch?

It is generated by autoheader in autoconf 2.59.

> 
> BTW: I'll implement asm checks for target-support.exp. Stay tuned ;)
> 

I will wait for your patch.

Thanks.


H.J.


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