OSDN Git Service

gcc/
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / i386 / sse4_1-check.h
index 78e8051..2d1c4e8 100644 (file)
@@ -1,22 +1,23 @@
-#include <stdio.h>
 #include <stdlib.h>
 
-#include "../auto-host.h"
-
-#include "../../gcc.dg/i386-cpuid.h"
+#include "cpuid.h"
+#include "m128-check.h"
 
 static void sse4_1_test (void);
 
+#define MASK 0x2
+
 int
 main ()
 {
-  unsigned long cpu_facilities;
+  unsigned int eax, ebx, ecx, edx;
  
-  cpu_facilities = i386_cpuid_ecx ();
+  if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
+    return 0;
 
   /* Run SSE4.1 test only if host has SSE4.1 support.  */
-  if ((cpu_facilities & bit_SSE4_1))
+  if (ecx & bit_SSE4_1)
     sse4_1_test ();
 
-  exit (0);
+  return 0;
 }