aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-01-03 10:06:36 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2006-01-03 10:06:36 +0100
commit396b535a72eb44422b3b8f0f1c220b11ab34b24d (patch)
treedab8b9cb403c11fdc457493e3669ac22aeb9fb22 /gcc/testsuite
parent357d956ebd51983d4a15dcd4de6cb49dba7db9ca (diff)
downloadgcc-396b535a72eb44422b3b8f0f1c220b11ab34b24d.zip
gcc-396b535a72eb44422b3b8f0f1c220b11ab34b24d.tar.gz
gcc-396b535a72eb44422b3b8f0f1c220b11ab34b24d.tar.bz2
backport: sync.md: New file.
Merge from gomp-branch. * config/sparc/sync.md: New file. * config/sparc/sparc.md (UNSPECV_MEMBAR, UNSPECV_CAS, UNSPECV_SWAP, UNSPECV_LDSTUB): New constants. * config/sparc/sparc.c (sparc_expand_compare_and_swap_12): New function. * config/sparc/predicates.md (memory_reg_operand): New predicate. * config/sparc/sparc-protos.h (sparc_expand_compare_and_swap_12): New prototype. * gcc.dg/ia64-sync-1.c: On sparc*-*-*, pass -mcpu=v9. * gcc.dg/ia64-sync-2.c: Likewise. * gcc.dg/ia64-sync-3.c: Likewise. * gcc.dg/ia64-sync-4.c: Likewise. * gcc.dg/sync-2.c: Likewise. * lib/target-supports.exp (sync_char_short, sync_int_long): Indicate that sparc64-*-* and sparcv9-*-* supports sync builtins. From-SVN: r109271
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog11
-rw-r--r--gcc/testsuite/gcc.dg/ia64-sync-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/ia64-sync-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/ia64-sync-3.c1
-rw-r--r--gcc/testsuite/gcc.dg/ia64-sync-4.c1
-rw-r--r--gcc/testsuite/gcc.dg/sync-2.c1
-rw-r--r--gcc/testsuite/lib/target-supports.exp8
7 files changed, 22 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index f96ba05..1acf301 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,14 @@
+2006-01-03 Jakub Jelinek <jakub@redhat.com>
+
+ Merge from gomp-branch.
+ * gcc.dg/ia64-sync-1.c: On sparc*-*-*, pass -mcpu=v9.
+ * gcc.dg/ia64-sync-2.c: Likewise.
+ * gcc.dg/ia64-sync-3.c: Likewise.
+ * gcc.dg/ia64-sync-4.c: Likewise.
+ * gcc.dg/sync-2.c: Likewise.
+ * lib/target-supports.exp (sync_char_short, sync_int_long): Indicate
+ that sparc64-*-* and sparcv9-*-* supports sync builtins.
+
2006-01-02 Mark Mitchell <mark@codesourcery.com>
PR c++/25635
diff --git a/gcc/testsuite/gcc.dg/ia64-sync-1.c b/gcc/testsuite/gcc.dg/ia64-sync-1.c
index af1411c..8f4512e 100644
--- a/gcc/testsuite/gcc.dg/ia64-sync-1.c
+++ b/gcc/testsuite/gcc.dg/ia64-sync-1.c
@@ -2,6 +2,7 @@
/* { dg-require-effective-target sync_int_long } */
/* { dg-options } */
/* { dg-options "-march=i486" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
+/* { dg-options "-mcpu=v9" { target sparc*-*-* } } */
/* Test basic functionality of the intrinsics. The operations should
not be optimized away if no one checks the return values. */
diff --git a/gcc/testsuite/gcc.dg/ia64-sync-2.c b/gcc/testsuite/gcc.dg/ia64-sync-2.c
index 73e793f..bb8c728 100644
--- a/gcc/testsuite/gcc.dg/ia64-sync-2.c
+++ b/gcc/testsuite/gcc.dg/ia64-sync-2.c
@@ -2,6 +2,7 @@
/* { dg-require-effective-target sync_int_long } */
/* { dg-options } */
/* { dg-options "-march=i486" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
+/* { dg-options "-mcpu=v9" { target sparc*-*-* } } */
/* Test basic functionality of the intrinsics. */
diff --git a/gcc/testsuite/gcc.dg/ia64-sync-3.c b/gcc/testsuite/gcc.dg/ia64-sync-3.c
index 9e8d40c..d093cdd 100644
--- a/gcc/testsuite/gcc.dg/ia64-sync-3.c
+++ b/gcc/testsuite/gcc.dg/ia64-sync-3.c
@@ -2,6 +2,7 @@
/* { dg-require-effective-target sync_int_long } */
/* { dg-options } */
/* { dg-options "-march=i486" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
+/* { dg-options "-mcpu=v9" { target sparc*-*-* } } */
/* Test basic functionality of the intrinsics. */
diff --git a/gcc/testsuite/gcc.dg/ia64-sync-4.c b/gcc/testsuite/gcc.dg/ia64-sync-4.c
index 8cd3940..e78fb4c 100644
--- a/gcc/testsuite/gcc.dg/ia64-sync-4.c
+++ b/gcc/testsuite/gcc.dg/ia64-sync-4.c
@@ -2,6 +2,7 @@
/* { dg-require-effective-target sync_int_long } */
/* { dg-options "-O2 -finline-functions" } */
/* { dg-options "-march=i486" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
+/* { dg-options "-mcpu=v9" { target sparc*-*-* } } */
/* Test inlining __sync_bool_compare_and_swap. */
diff --git a/gcc/testsuite/gcc.dg/sync-2.c b/gcc/testsuite/gcc.dg/sync-2.c
index ab2e276..c82d665 100644
--- a/gcc/testsuite/gcc.dg/sync-2.c
+++ b/gcc/testsuite/gcc.dg/sync-2.c
@@ -1,6 +1,7 @@
/* { dg-do run } */
/* { dg-require-effective-target sync_char_short } */
/* { dg-options "-march=i486" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
+/* { dg-options "-mcpu=v9" { target sparc*-*-* } } */
/* Test functionality of the intrinsics for 'short' and 'char'. */
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index edafc74..2e91a16 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -1356,7 +1356,9 @@ proc check_effective_target_sync_int_long { } {
|| [istarget x86_64-*-*]
|| [istarget alpha*-*-*]
|| [istarget s390*-*-*]
- || [istarget powerpc*-*-*] } {
+ || [istarget powerpc*-*-*]
+ || [istarget sparc64-*-*]
+ || [istarget sparcv9-*-*] } {
set et_sync_int_long_saved 1
}
}
@@ -1381,7 +1383,9 @@ proc check_effective_target_sync_char_short { } {
|| [istarget x86_64-*-*]
|| [istarget alpha*-*-*]
|| [istarget s390*-*-*]
- || [istarget powerpc*-*-*] } {
+ || [istarget powerpc*-*-*]
+ || [istarget sparc64-*-*]
+ || [istarget sparcv9-*-*] } {
set et_sync_char_short_saved 1
}
}