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]

x86 MMX/SSE testsuite additions/modifications


This adds validation tests for the inline functions for SSE2/SSE3 and
verification that no undefined builtin functions are referenced by the
respective MMX/SSE tests. I would have (to uncover more problems)
changed
the "dg-do compile" to "dg-do assemble" (to also cover the case of bad
assembly generated) if I wasn't told not to modify pre-existing tests.

This patch alone will cause various failure for ix86 and x86-64 in the
modified tests, but since the fixes for these failures are independent
of one another they will be subsequently submitted.

Jan

testsuite:
2004-07-08 Jan Beulich <jbeulich@novell.com>

	* gcc.dg/i386-mmx-[12].c: Force error for references to
undefined builtins.
	* gcc.dg/i386-sse-[12].c: Dito.
	* gcc.dg/i386-sse2-[12].c: New tests to validate SSE2 inline
functions.
	* gcc.dg/i386-sse3-[12].c: New tests to validate SSE3 inline
functions.

---
/home/jbeulich/src/gcc/mainline/2004-07-05.10.09/gcc/testsuite/gcc.dg/i386-mmx-1.c	2002-01-15
07:17:04.000000000 +0100
+++ 2004-07-05.10.09/gcc/testsuite/gcc.dg/i386-mmx-1.c	2004-06-15
15:34:49.000000000 +0200
@@ -1,5 +1,5 @@
 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O2 -mmmx" } */
+/* { dg-options "-O2 -Werror-implicit-function-declaration -mmmx" }
*/
 
 /* Test that the intrinsics compile with optimization.  All of them
are
    defined as inline functions in mmintrin.h that reference the
proper
---
/home/jbeulich/src/gcc/mainline/2004-07-05.10.09/gcc/testsuite/gcc.dg/i386-mmx-2.c	2002-01-15
07:17:04.000000000 +0100
+++ 2004-07-05.10.09/gcc/testsuite/gcc.dg/i386-mmx-2.c	2004-06-15
15:34:53.000000000 +0200
@@ -1,5 +1,5 @@
 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O0 -mmmx" } */
+/* { dg-options "-O0 -Werror-implicit-function-declaration -mmmx" }
*/
 
 /* Test that the intrinsics compile without optimization.  All of them
are
    defined as inline functions in mmintrin.h that reference the
proper
---
/home/jbeulich/src/gcc/mainline/2004-07-05.10.09/gcc/testsuite/gcc.dg/i386-sse-1.c	2002-01-15
07:17:04.000000000 +0100
+++ 2004-07-05.10.09/gcc/testsuite/gcc.dg/i386-sse-1.c	2004-06-15
15:35:15.000000000 +0200
@@ -1,5 +1,5 @@
 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O2 -msse" } */
+/* { dg-options "-O2 -Werror-implicit-function-declaration -msse" }
*/
 
 /* Test that the intrinsics compile with optimization.  All of them
are
    defined as inline functions in mmintrin.h that reference the
proper
---
/home/jbeulich/src/gcc/mainline/2004-07-05.10.09/gcc/testsuite/gcc.dg/i386-sse-2.c	2002-01-15
07:17:04.000000000 +0100
+++ 2004-07-05.10.09/gcc/testsuite/gcc.dg/i386-sse-2.c	2004-06-15
15:35:21.000000000 +0200
@@ -1,5 +1,5 @@
 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O0 -msse" } */
+/* { dg-options "-O0 -Werror-implicit-function-declaration -msse" }
*/
 
 /* Test that the intrinsics compile without optimization.  All of them
are
    defined as inline functions in mmintrin.h that reference the
proper
---
/home/jbeulich/src/gcc/mainline/2004-07-05.10.09/gcc/testsuite/gcc.dg/i386-sse2-1.c	1970-01-01
01:00:00.000000000 +0100
+++
2004-07-05.10.09/gcc/testsuite/gcc.dg/i386-sse2-1.c	2004-06-15
15:35:28.000000000 +0200
@@ -0,0 +1,12 @@
+/* { dg-do assemble { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -Werror-implicit-function-declaration -msse2" }
*/
+
+/* Test that the intrinsics compile with optimization.  All of them
are
+   defined as inline functions in mmintrin.h that reference the
proper
+   builtin functions.  Defining away "static" and "__inline" results
in
+   all of them being compiled as proper functions.  */
+
+#define static
+#define __inline
+
+#include <emmintrin.h>
---
/home/jbeulich/src/gcc/mainline/2004-07-05.10.09/gcc/testsuite/gcc.dg/i386-sse2-2.c	1970-01-01
01:00:00.000000000 +0100
+++
2004-07-05.10.09/gcc/testsuite/gcc.dg/i386-sse2-2.c	2004-06-15
15:35:30.000000000 +0200
@@ -0,0 +1,12 @@
+/* { dg-do assemble { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O0 -Werror-implicit-function-declaration -msse2" }
*/
+
+/* Test that the intrinsics compile without optimization.  All of them
are
+   defined as inline functions in mmintrin.h that reference the
proper
+   builtin functions.  Defining away "static" and "__inline" results
in
+   all of them being compiled as proper functions.  */
+
+#define static
+#define __inline
+
+#include <emmintrin.h>
---
/home/jbeulich/src/gcc/mainline/2004-07-05.10.09/gcc/testsuite/gcc.dg/i386-sse3-1.c	1970-01-01
01:00:00.000000000 +0100
+++
2004-07-05.10.09/gcc/testsuite/gcc.dg/i386-sse3-1.c	2004-06-15
15:35:34.000000000 +0200
@@ -0,0 +1,12 @@
+/* { dg-do assemble { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -Werror-implicit-function-declaration -msse3" }
*/
+
+/* Test that the intrinsics compile with optimization.  All of them
are
+   defined as inline functions in mmintrin.h that reference the
proper
+   builtin functions.  Defining away "static" and "__inline" results
in
+   all of them being compiled as proper functions.  */
+
+#define static
+#define __inline
+
+#include <pmmintrin.h>
---
/home/jbeulich/src/gcc/mainline/2004-07-05.10.09/gcc/testsuite/gcc.dg/i386-sse3-2.c	1970-01-01
01:00:00.000000000 +0100
+++
2004-07-05.10.09/gcc/testsuite/gcc.dg/i386-sse3-2.c	2004-06-15
15:35:37.000000000 +0200
@@ -0,0 +1,12 @@
+/* { dg-do assemble { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O0 -Werror-implicit-function-declaration -msse3" }
*/
+
+/* Test that the intrinsics compile without optimization.  All of them
are
+   defined as inline functions in mmintrin.h that reference the
proper
+   builtin functions.  Defining away "static" and "__inline" results
in
+   all of them being compiled as proper functions.  */
+
+#define static
+#define __inline
+
+#include <pmmintrin.h>

Attachment: gcc-mainline-x86-mm-testsuite.patch
Description: Binary data


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