@@ -136,7 +136,7 @@ macro_rules! compare_and_swap {
136
136
expected: int_ty!( $bytes) , desired: int_ty!( $bytes) , ptr: * mut int_ty!( $bytes)
137
137
) -> int_ty!( $bytes) {
138
138
// We can't use `AtomicI8::compare_and_swap`; we *are* compare_and_swap.
139
- unsafe { core:: arch:: naked_asm! {
139
+ core:: arch:: naked_asm! {
140
140
// UXT s(tmp0), s(0)
141
141
concat!( uxt!( $bytes) , " " , reg!( $bytes, 16 ) , ", " , reg!( $bytes, 0 ) ) ,
142
142
"0:" ,
@@ -150,7 +150,7 @@ macro_rules! compare_and_swap {
150
150
"cbnz w17, 0b" ,
151
151
"1:" ,
152
152
"ret" ,
153
- } }
153
+ }
154
154
}
155
155
}
156
156
} ;
@@ -165,7 +165,7 @@ macro_rules! compare_and_swap_i128 {
165
165
pub unsafe extern "C" fn $name (
166
166
expected: i128 , desired: i128 , ptr: * mut i128
167
167
) -> i128 {
168
- unsafe { core:: arch:: naked_asm! {
168
+ core:: arch:: naked_asm! {
169
169
"mov x16, x0" ,
170
170
"mov x17, x1" ,
171
171
"0:" ,
@@ -179,7 +179,7 @@ macro_rules! compare_and_swap_i128 {
179
179
"cbnz w15, 0b" ,
180
180
"1:" ,
181
181
"ret" ,
182
- } }
182
+ }
183
183
}
184
184
}
185
185
} ;
@@ -194,7 +194,7 @@ macro_rules! swap {
194
194
pub unsafe extern "C" fn $name (
195
195
left: int_ty!( $bytes) , right_ptr: * mut int_ty!( $bytes)
196
196
) -> int_ty!( $bytes) {
197
- unsafe { core:: arch:: naked_asm! {
197
+ core:: arch:: naked_asm! {
198
198
// mov s(tmp0), s(0)
199
199
concat!( "mov " , reg!( $bytes, 16 ) , ", " , reg!( $bytes, 0 ) ) ,
200
200
"0:" ,
@@ -204,7 +204,7 @@ macro_rules! swap {
204
204
concat!( stxr!( $ordering, $bytes) , " w17, " , reg!( $bytes, 16 ) , ", [x1]" ) ,
205
205
"cbnz w17, 0b" ,
206
206
"ret" ,
207
- } }
207
+ }
208
208
}
209
209
}
210
210
} ;
@@ -219,7 +219,7 @@ macro_rules! fetch_op {
219
219
pub unsafe extern "C" fn $name (
220
220
val: int_ty!( $bytes) , ptr: * mut int_ty!( $bytes)
221
221
) -> int_ty!( $bytes) {
222
- unsafe { core:: arch:: naked_asm! {
222
+ core:: arch:: naked_asm! {
223
223
// mov s(tmp0), s(0)
224
224
concat!( "mov " , reg!( $bytes, 16 ) , ", " , reg!( $bytes, 0 ) ) ,
225
225
"0:" ,
@@ -231,7 +231,7 @@ macro_rules! fetch_op {
231
231
concat!( stxr!( $ordering, $bytes) , " w15, " , reg!( $bytes, 17 ) , ", [x1]" ) ,
232
232
"cbnz w15, 0b" ,
233
233
"ret" ,
234
- } }
234
+ }
235
235
}
236
236
}
237
237
}
0 commit comments