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.
This commit is contained in:
Maciej W. Rozycki 2020-12-05 18:26:25 +00:00
parent 65eee57a8c
commit da076a8b12
2 changed files with 40 additions and 0 deletions

View File

@ -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," } } */

View File

@ -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," } } */