Debian Codegraph @

gcc/testsuite/gcc.target/riscv/amo/a-rvwmo-store-release.c

raw
1 /* { dg-do compile } */
2 /* Verify that store mappings match the PSABI doc's recommended mapping. */
3 /* { dg-options "-O3" } */
4 /* { dg-remove-options riscv_ztso } */
5 /* { dg-skip-if "" { *-*-* } { "-g" "-flto"} } */
6 /* { dg-final { check-function-bodies "**" "" } } */
7
8 /*
9 ** atomic_store_long_release:
10 ** l[wd]\t[atx][0-9]+,0\(a1\)
11 ** fence\trw,w
12 ** s[wd]\t[atx][0-9]+,0\(a0\)
13 ** ret
14 */
15 void atomic_store_long_release (long* bar, long* baz)
16 {
17 __atomic_store(bar, baz, __ATOMIC_RELEASE);
18 }
19
20 /*
21 ** atomic_store_int_release:
22 ** lw\t[atx][0-9]+,0\(a1\)
23 ** fence\trw,w
24 ** sw\t[atx][0-9]+,0\(a0\)
25 ** ret
26 */
27 void atomic_store_int_release (int* bar, int* baz)
28 {
29 __atomic_store(bar, baz, __ATOMIC_RELEASE);
30 }
31
32 /*
33 ** atomic_store_short_release:
34 ** lhu\t[atx][0-9]+,0\(a1\)
35 ** fence\trw,w
36 ** sh\t[atx][0-9]+,0\(a0\)
37 ** ret
38 */
39 void atomic_store_short_release (short* bar, short* baz)
40 {
41 __atomic_store(bar, baz, __ATOMIC_RELEASE);
42 }
43
44 /*
45 ** atomic_store_char_release:
46 ** lbu\t[atx][0-9]+,0\(a1\)
47 ** fence\trw,w
48 ** sb\t[atx][0-9]+,0\(a0\)
49 ** ret
50 */
51 void atomic_store_char_release (char* bar, char* baz)
52 {
53 __atomic_store(bar, baz, __ATOMIC_RELEASE);
54 }
55
56 /*
57 ** atomic_store_bool_release:
58 ** lbu\t[atx][0-9]+,0\(a1\)
59 ** fence\trw,w
60 ** sb\t[atx][0-9]+,0\(a0\)
61 ** ret
62 */
63 void atomic_store_bool_release (_Bool* bar, _Bool* baz)
64 {
65 __atomic_store(bar, baz, __ATOMIC_RELEASE);
66 }