summaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.c/atomic-5.c
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2009-03-25 14:36:02 +0100
committerUros Bizjak <uros@gcc.gnu.org>2009-03-25 14:36:02 +0100
commite50ea10b75a2af7551b4f25448fa25105019863f (patch)
tree375bff9fc45bc2ed43c7849dd6264aa8d06342bc /libgomp/testsuite/libgomp.c/atomic-5.c
parent370017b40f9776c6861618c06f605903aa53b42e (diff)
downloadgcc-e50ea10b75a2af7551b4f25448fa25105019863f.tar.gz
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
Diffstat (limited to 'libgomp/testsuite/libgomp.c/atomic-5.c')
-rw-r--r--libgomp/testsuite/libgomp.c/atomic-5.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libgomp/testsuite/libgomp.c/atomic-5.c b/libgomp/testsuite/libgomp.c/atomic-5.c
index 3b4b0f11d64..168f68dd6a7 100644
--- a/libgomp/testsuite/libgomp.c/atomic-5.c
+++ b/libgomp/testsuite/libgomp.c/atomic-5.c
@@ -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;
}