blob: 74d8df99ddcac536a187a171bb50eb5beaf513ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
/* { dg-do compile } */
/* Verify that atomic op mappings match the Ztso suggested mapping. */
/* { dg-options "-O3" } */
/* { dg-add-options riscv_zaamo } */
/* { dg-add-options riscv_ztso } */
/* { dg-skip-if "" { *-*-* } { "-g" "-flto"} } */
/* { dg-final { check-function-bodies "**" "" } } */
/*
** foo:
** amoadd\.w\tzero,a1,0\(a0\)
** ret
*/
void foo (int* bar, int* baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_SEQ_CST);
}
|