Commit e50ea10b by Uros Bizjak

atomic-5.c: Cleanup cpuid usage.

	* testsuite/libgomp.c/atomic-5.c: Cleanup cpuid usage.
	* testsuite/libgomp.c/atomic-6.c: Ditto.

From-SVN: r145061
parent 370017b4
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> 2009-03-23 Jakub Jelinek <jakub@redhat.com>
PR c/39495 PR c/39495
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
/* { dg-options "-O2 -mcx16" { target { { i?86-*-* x86_64-*-* } && lp64 } } } */ /* { dg-options "-O2 -mcx16" { target { { i?86-*-* x86_64-*-* } && lp64 } } } */
#ifdef __x86_64__ #ifdef __x86_64__
# include "../../../gcc/config/i386/cpuid.h" # include "cpuid.h"
#endif #endif
extern void abort (void); extern void abort (void);
...@@ -31,10 +31,11 @@ main (void) ...@@ -31,10 +31,11 @@ main (void)
if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx)) if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
return 0; return 0;
if (ecx & bit_CMPXCHG16B) if (!(ecx & bit_CMPXCHG16B))
do_test (); return 0;
#else
do_test ();
#endif #endif
do_test ();
return 0; return 0;
} }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
/* { dg-options "-O2 -march=i586" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */ /* { dg-options "-O2 -march=i586" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
#ifdef __i386__ #ifdef __i386__
# include "../../../gcc/config/i386/cpuid.h" # include "cpuid.h"
#endif #endif
extern void abort (void); extern void abort (void);
...@@ -28,10 +28,11 @@ main (void) ...@@ -28,10 +28,11 @@ main (void)
if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx)) if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
return 0; return 0;
if (edx & bit_CMPXCHG8B) if (!(edx & bit_CMPXCHG8B))
do_test (); return 0;
#else
do_test ();
#endif #endif
do_test ();
return 0; return 0;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment