aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2009-03-25 13:36:02 +0000
committerUros Bizjak <ubizjak@gmail.com>2009-03-25 13:36:02 +0000
commitba0869084b82d17666efee1bfc49830363e1b9ad (patch)
tree375bff9fc45bc2ed43c7849dd6264aa8d06342bc
parent6fc2221fc1a29ccfc812ea9a3a20662bcd54e502 (diff)
* testsuite/libgomp.c/atomic-5.c: Cleanup cpuid usage.
* testsuite/libgomp.c/atomic-6.c: Ditto. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@145061 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libgomp/ChangeLog7
-rw-r--r--libgomp/testsuite/libgomp.c/atomic-5.c11
-rw-r--r--libgomp/testsuite/libgomp.c/atomic-6.c11
3 files changed, 18 insertions, 11 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 205bcceaaee..a77fdde70e9 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -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>
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;
}
diff --git a/libgomp/testsuite/libgomp.c/atomic-6.c b/libgomp/testsuite/libgomp.c/atomic-6.c
index 8e7fca59600..59baf7dd3e2 100644
--- a/libgomp/testsuite/libgomp.c/atomic-6.c
+++ b/libgomp/testsuite/libgomp.c/atomic-6.c
@@ -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;
}