atomic-5.c: Cleanup cpuid usage.
authorUros Bizjak <uros@gcc.gnu.org>
Wed, 25 Mar 2009 13:36:02 +0000 (14:36 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Wed, 25 Mar 2009 13:36:02 +0000 (14:36 +0100)
* testsuite/libgomp.c/atomic-5.c: Cleanup cpuid usage.
* testsuite/libgomp.c/atomic-6.c: Ditto.

From-SVN: r145061

libgomp/ChangeLog
libgomp/testsuite/libgomp.c/atomic-5.c
libgomp/testsuite/libgomp.c/atomic-6.c

index 205bcceaaee43686873c8fd67cdb33759c4d837f..a77fdde70e9f6a88ffb16b93c8e8caf228305986 100644 (file)
@@ -1,3 +1,8 @@
+2009-03-25  Uros Bizjak  <ubizjak@gmail.com>
+
+       * testsuite/libgomp.c/atomic-5.c: Cleanup cpuid usage.
+       * testsuite/libgomp.c/atomic-6.c: Ditto.
+
 2009-03-23  Jakub Jelinek  <jakub@redhat.com>
 
        PR c/39495
@@ -25,7 +30,7 @@
 
 2009-01-19  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>
 
-        * testsuite/lib/libgomp.exp: Add -B option for targets that
+       * testsuite/lib/libgomp.exp: Add -B option for targets that
        use libgfortran.a%s in their specs.
 
 2009-01-07  Jakub Jelinek  <jakub@redhat.com>
index 3b4b0f11d6464e43726d38bb9a57d16ca26e6feb..168f68dd6a7d340de8541d4567681bc781d48b39 100644 (file)
@@ -3,7 +3,7 @@
 /* { dg-options "-O2 -mcx16" { target { { i?86-*-* x86_64-*-* } && lp64 } } } */
 
 #ifdef __x86_64__
-# include "../../../gcc/config/i386/cpuid.h"
+# include "cpuid.h"
 #endif
 
 extern void abort (void);
@@ -31,10 +31,11 @@ main (void)
   if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
     return 0;
 
-  if (ecx & bit_CMPXCHG16B)
-    do_test ();
-#else
-  do_test ();
+  if (!(ecx & bit_CMPXCHG16B))
+    return 0;
 #endif
+
+  do_test ();
+
   return 0;
 }
index 8e7fca596007184988ec2d8ca007ce01720e1908..59baf7dd3e20b744980748c5386384f7f0ec2a6a 100644 (file)
@@ -4,7 +4,7 @@
 /* { dg-options "-O2 -march=i586" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
 
 #ifdef __i386__
-# include "../../../gcc/config/i386/cpuid.h"
+# include "cpuid.h"
 #endif
 
 extern void abort (void);
@@ -28,10 +28,11 @@ main (void)
   if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
     return 0;
 
-  if (edx & bit_CMPXCHG8B)
-    do_test ();
-#else
-  do_test ();
+  if (!(edx & bit_CMPXCHG8B))
+    return 0;
 #endif
+
+  do_test ();
+
   return 0;
 }