public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Maciej W. Rozycki <macro@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-5779] VAX: Add tests for `sync_lock_test_and_set' and `sync_lock_release' Date: Sat, 5 Dec 2020 18:28:54 +0000 (GMT) [thread overview] Message-ID: <20201205182854.3363B3887022@sourceware.org> (raw) 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," } } */
reply other threads:[~2020-12-05 18:28 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20201205182854.3363B3887022@sourceware.org \ --to=macro@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).