OSDN Git Service

2006-04-26 H.J. Lu <hongjiu.lu@intel.com>
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 27 Apr 2006 06:13:40 +0000 (06:13 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 27 Apr 2006 06:13:40 +0000 (06:13 +0000)
PR testsuite/27274:
* gcc.target/i386/sse-9.c: Include "../../gcc.dg/i386-cpuid.h".
(main): Exit if processor doesn't support SSE.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113296 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/sse-9.c

index 90b5b26..760438b 100644 (file)
@@ -1,3 +1,9 @@
+2006-04-26  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR testsuite/27274:
+       * gcc.target/i386/sse-9.c: Include "../../gcc.dg/i386-cpuid.h".
+       (main): Exit if processor doesn't support SSE.
+
 2006-04-26  David Edelsohn  <edelsohn@gnu.org>
 
        PR middle-end/27282
index 1fe7ada..27b4e32 100644 (file)
@@ -4,6 +4,7 @@
 #include <stdlib.h>
 #include <stddef.h>
 #include <string.h>
+#include "../../gcc.dg/i386-cpuid.h"
 
 int
 main()
@@ -12,6 +13,13 @@ main()
   void *ptr;
   int errors = 0;
   const char test [] = "This is a test.";
+  unsigned long cpu_facilities;
+
+  cpu_facilities = i386_cpuid ();
+
+  if ((cpu_facilities & bit_SSE) != bit_SSE )
+    /* If host has no vector support, pass.  */
+    exit (0);
 
   for (alignment = 1; alignment <= (1 << 20); alignment += alignment)
     {