This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Add SSE4.1 testcases
- From: "Uros Bizjak" <ubizjak at gmail dot com>
- To: "GCC Patches" <gcc-patches at gcc dot gnu dot org>
- Cc: "H. J. Lu" <hjl at lucon dot org>
- Date: Tue, 22 May 2007 08:48:18 +0200
- Subject: Re: PATCH: Add SSE4.1 testcases
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
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.
-/* 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?
BTW: I'll implement asm checks for target-support.exp. Stay tuned ;)
Uros.