Debian Codegraph @

gcc/testsuite/gcc.target/riscv/amo/a-ztso-load-acquire.c

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