5
5
// Not supported: v5, v6-M
6
6
// NOTE: there's no dedicated CLREX instruction in v6 (<v6k); to clear the exclusive monitor users
7
7
// have to do a dummy STREX operation
8
+ #[ cfg( target_feature = "aarch64" ) ]
8
9
#[ cfg( any(
9
10
all( target_feature = "v6k" , not( target_feature = "mclass" ) ) , // excludes v6-M
10
11
all( target_feature = "v7" , target_feature = "mclass" ) , // v7-M
12
+ doc
11
13
) ) ]
12
14
pub unsafe fn __clrex ( ) {
13
15
extern "C" {
@@ -21,9 +23,11 @@ pub unsafe fn __clrex() {
21
23
/// Executes a exclusive LDR instruction for 8 bit value.
22
24
// Supported: v6K, v7-M, v7-A, v7-R
23
25
// Not supported: v5, v6, v6-M
24
- #[ cfg(
26
+ #[ cfg( target_feature = "aarch64" ) ]
27
+ #[ cfg( any(
25
28
target_feature = "v6k" , // includes v7-M but excludes v6-M
26
- ) ]
29
+ doc
30
+ ) ) ]
27
31
pub unsafe fn __ldrexb ( p : * const u8 ) -> u8 {
28
32
extern "C" {
29
33
#[ link_name = "llvm.arm.ldrex.p0i8" ]
@@ -36,9 +40,11 @@ pub unsafe fn __ldrexb(p: *const u8) -> u8 {
36
40
/// Executes a exclusive LDR instruction for 16 bit value.
37
41
// Supported: v6K, v7-M, v7-A, v7-R, v8
38
42
// Not supported: v5, v6, v6-M
39
- #[ cfg(
43
+ #[ cfg( target_feature = "aarch64" ) ]
44
+ #[ cfg( any(
40
45
target_feature = "v6k" , // includes v7-M but excludes v6-M
41
- ) ]
46
+ doc
47
+ ) ) ]
42
48
pub unsafe fn __ldrexh ( p : * const u16 ) -> u16 {
43
49
extern "C" {
44
50
#[ link_name = "llvm.arm.ldrex.p0i16" ]
@@ -51,9 +57,11 @@ pub unsafe fn __ldrexh(p: *const u16) -> u16 {
51
57
/// Executes a exclusive LDR instruction for 32 bit value.
52
58
// Supported: v6, v7-M, v6K, v7-A, v7-R, v8
53
59
// Not supported: v5, v6-M
60
+ #[ cfg( target_feature = "aarch64" ) ]
54
61
#[ cfg( any(
55
62
all( target_feature = "v6" , not( target_feature = "mclass" ) ) , // excludes v6-M
56
63
all( target_feature = "v7" , target_feature = "mclass" ) , // v7-M
64
+ doc
57
65
) ) ]
58
66
pub unsafe fn __ldrex ( p : * const u32 ) -> u32 {
59
67
extern "C" {
@@ -69,9 +77,11 @@ pub unsafe fn __ldrex(p: *const u32) -> u32 {
69
77
/// Returns `0` if the operation succeeded, or `1` if it failed
70
78
// supported: v6K, v7-M, v7-A, v7-R
71
79
// Not supported: v5, v6, v6-M
72
- #[ cfg(
80
+ #[ cfg( target_feature = "aarch64" ) ]
81
+ #[ cfg( any(
73
82
target_feature = "v6k" , // includes v7-M but excludes v6-M
74
- ) ]
83
+ doc
84
+ ) ) ]
75
85
pub unsafe fn __strexb ( value : u32 , addr : * mut u8 ) -> u32 {
76
86
extern "C" {
77
87
#[ link_name = "llvm.arm.strex.p0i8" ]
@@ -86,9 +96,11 @@ pub unsafe fn __strexb(value: u32, addr: *mut u8) -> u32 {
86
96
/// Returns `0` if the operation succeeded, or `1` if it failed
87
97
// Supported: v6K, v7-M, v7-A, v7-R, v8
88
98
// Not supported: v5, v6, v6-M
89
- #[ cfg(
99
+ #[ cfg( target_feature = "aarch64" ) ]
100
+ #[ cfg( any(
90
101
target_feature = "v6k" , // includes v7-M but excludes v6-M
91
- ) ]
102
+ doc
103
+ ) ) ]
92
104
pub unsafe fn __strexh ( value : u16 , addr : * mut u16 ) -> u32 {
93
105
extern "C" {
94
106
#[ link_name = "llvm.arm.strex.p0i16" ]
@@ -103,9 +115,11 @@ pub unsafe fn __strexh(value: u16, addr: *mut u16) -> u32 {
103
115
/// Returns `0` if the operation succeeded, or `1` if it failed
104
116
// Supported: v6, v7-M, v6K, v7-A, v7-R, v8
105
117
// Not supported: v5, v6-M
118
+ #[ cfg( target_feature = "aarch64" ) ]
106
119
#[ cfg( any(
107
120
all( target_feature = "v6" , not( target_feature = "mclass" ) ) , // excludes v6-M
108
121
all( target_feature = "v7" , target_feature = "mclass" ) , // v7-M
122
+ doc
109
123
) ) ]
110
124
pub unsafe fn __strex ( value : u32 , addr : * mut u32 ) -> u32 {
111
125
extern "C" {
0 commit comments