blob: 5c0a8b8f6e9f741b76d26aaa1b79ff08edb0cd49 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
/* { dg-do compile } */
/* Verify that subword atomic op mappings match the Ztso suggested mapping. */
/* { dg-add-options riscv_zalrsc } */
/* { dg-add-options riscv_ztso } */
/* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
/* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
void foo (short* bar, short* baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_RELAXED);
}
|