blob: 8dbfa9c4fc82671c47668fdc2879ce0a4fbaa42e (
plain)
1
2
3
4
5
6
7
8
9
10
|
/* { dg-do compile } */
/* Verify that subword atomic op mappings match Table A.6's recommended mapping. */
/* { dg-add-options riscv_zalrsc } */
/* { dg-final { scan-assembler-times "lr.w.aqrl\t" 1 } } */
/* { dg-final { scan-assembler-times "sc.w.rl\t" 1 } } */
void foo (short* bar, short* baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_SEQ_CST);
}
|