public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-5779] VAX: Add tests for `sync_lock_test_and_set' and `sync_lock_release'
@ 2020-12-05 18:28 Maciej W. Rozycki
  0 siblings, 0 replies; only message in thread
From: Maciej W. Rozycki @ 2020-12-05 18:28 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:da076a8b12c17b10cfe2e6a9c5ea84aa0a0f5ebf

commit r11-5779-gda076a8b12c17b10cfe2e6a9c5ea84aa0a0f5ebf
Author: Maciej W. Rozycki <macro@linux-mips.org>
Date:   Sat Dec 5 18:26:25 2020 +0000

    VAX: Add tests for `sync_lock_test_and_set' and `sync_lock_release'
    
    Based on gcc.dg/pr61756.c.
    
            gcc/testsuite/
            * gcc.target/vax/bbcci.c: New test.
            * gcc.target/vax/bbssi.c: New test.

Diff:
---
 gcc/testsuite/gcc.target/vax/bbcci.c | 20 ++++++++++++++++++++
 gcc/testsuite/gcc.target/vax/bbssi.c | 20 ++++++++++++++++++++
 2 files changed, 40 insertions(+)

diff --git a/gcc/testsuite/gcc.target/vax/bbcci.c b/gcc/testsuite/gcc.target/vax/bbcci.c
new file mode 100644
index 00000000000..f58d3a75e7d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/vax/bbcci.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+
+#include <stdatomic.h>
+
+extern volatile atomic_flag guard;
+
+void
+try_atomic_flag_clear (void)
+{
+  atomic_flag_clear (&guard);
+}
+
+/* Expect assembly like:
+
+	jbcci $0,guard,.L2
+.L2:
+
+ */
+
+/* { dg-final { scan-assembler "\tjbcci \\\$0,guard," } } */
diff --git a/gcc/testsuite/gcc.target/vax/bbssi.c b/gcc/testsuite/gcc.target/vax/bbssi.c
new file mode 100644
index 00000000000..65111e9bdf2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/vax/bbssi.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+
+#include <stdatomic.h>
+
+extern volatile atomic_flag guard;
+
+void
+try_atomic_flag_test_and_set (void)
+{
+  atomic_flag_test_and_set (&guard);
+}
+
+/* Expect assembly like:
+
+	jbssi $0,guard,.L1
+.L1:
+
+ */
+
+/* { dg-final { scan-assembler "\tjbssi \\\$0,guard," } } */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-05 18:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-05 18:28 [gcc r11-5779] VAX: Add tests for `sync_lock_test_and_set' and `sync_lock_release' Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).