aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/aarch64/ldapr-sext.c
blob: f57c09d0580624d884fd538075b4e2028aeea733 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/* { dg-do compile } */
/* { dg-options "-O2 -std=c99" } */
/* { dg-final { check-function-bodies "**" "" "" } } */
#include <stdatomic.h>

#pragma GCC target "arch=armv8.4-a"

atomic_ullong u64;
atomic_llong s64;
atomic_uint u32;
atomic_int s32;
atomic_ushort u16;
atomic_short s16;
atomic_uchar u8;
atomic_schar s8;

#define TEST(name, ldsize, rettype)				\
rettype								\
test_##name (void)						\
{								\
  return atomic_load_explicit (&ldsize, memory_order_acquire);	\
}

/*
**test_s8_s64:
**...
**	ldapursb	x0, \[x[0-9]+\]
**	ret
*/

TEST(s8_s64, s8, long long)

/*
**test_s16_s64:
**...
**	ldapursh	x0, \[x[0-9]+\]
**	ret
*/

TEST(s16_s64, s16, long long)

/*
**test_s32_s64:
**...
**	ldapursw	x0, \[x[0-9]+\]
**	ret
*/

TEST(s32_s64, s32, long long)

/*
**test_s8_s32:
**...
**	ldapursb	w0, \[x[0-9]+\]
**	ret
*/

TEST(s8_s32, s8, int)

/*
**test_s16_s32:
**...
**	ldapursh	w0, \[x[0-9]+\]
**	ret
*/

TEST(s16_s32, s16, int)