| 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_relaxed: |
| 10 |
** l[wd]\t[atx][0-9]+,0\(a1\) |
| 11 |
** s[wd]\t[atx][0-9]+,0\(a0\) |
| 12 |
** ret |
| 13 |
*/ |
| 14 |
void atomic_store_long_relaxed (long* bar, long* baz) |
| 15 |
{ |
| 16 |
__atomic_store(bar, baz, __ATOMIC_RELAXED); |
| 17 |
} |
| 18 |
|
| 19 |
/* |
| 20 |
** atomic_store_int_relaxed: |
| 21 |
** lw\t[atx][0-9]+,0\(a1\) |
| 22 |
** sw\t[atx][0-9]+,0\(a0\) |
| 23 |
** ret |
| 24 |
*/ |
| 25 |
void atomic_store_int_relaxed (int* bar, int* baz) |
| 26 |
{ |
| 27 |
__atomic_store(bar, baz, __ATOMIC_RELAXED); |
| 28 |
} |
| 29 |
|
| 30 |
/* |
| 31 |
** atomic_store_short_relaxed: |
| 32 |
** lhu\t[atx][0-9]+,0\(a1\) |
| 33 |
** sh\t[atx][0-9]+,0\(a0\) |
| 34 |
** ret |
| 35 |
*/ |
| 36 |
void atomic_store_short_relaxed (short* bar, short* baz) |
| 37 |
{ |
| 38 |
__atomic_store(bar, baz, __ATOMIC_RELAXED); |
| 39 |
} |
| 40 |
|
| 41 |
/* |
| 42 |
** atomic_store_char_relaxed: |
| 43 |
** lbu\t[atx][0-9]+,0\(a1\) |
| 44 |
** sb\t[atx][0-9]+,0\(a0\) |
| 45 |
** ret |
| 46 |
*/ |
| 47 |
void atomic_store_char_relaxed (char* bar, char* baz) |
| 48 |
{ |
| 49 |
__atomic_store(bar, baz, __ATOMIC_RELAXED); |
| 50 |
} |
| 51 |
|
| 52 |
/* |
| 53 |
** atomic_store_bool_relaxed: |
| 54 |
** lbu\t[atx][0-9]+,0\(a1\) |
| 55 |
** sb\t[atx][0-9]+,0\(a0\) |
| 56 |
** ret |
| 57 |
*/ |
| 58 |
void atomic_store_bool_relaxed (_Bool* bar, _Bool* baz) |
| 59 |
{ |
| 60 |
__atomic_store(bar, baz, __ATOMIC_RELAXED); |
| 61 |
} |