This is the mail archive of the 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 5/22/07, H. J. Lu <> wrote:

> /* { 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

The runtime check can be seen immediatelly at the top of testcase. And all existing test implements runtime check this way. Like from ssse3 tests:

--cut here--
#include "../../gcc.dg/i386-cpuid.h"
#include "ssse3-vals.h"

static void ssse3_test (void);

main ()
 unsigned long cpu_facilities;

cpu_facilities = i386_cpuid_ecx ();

 /* Run SSSE3 test only if host has SSSE3 support.  */
 if ((cpu_facilities & bit_SSSE3))
   ssse3_test ();

 exit (0);
--cut here--

This is all code that needs to be duplicated...

-/* 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.

Hm, this should be resolved elsewhere.

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

I will wait for your patch.

It is allready commited [1][2]. Please put in a compile-time check for sse4 target support (preferrably in pure C; just copy some representative intrinsic function from support header).



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