@@ -136,7 +136,7 @@ macro_rules! compare_and_swap {
136136 expected: int_ty!( $bytes) , desired: int_ty!( $bytes) , ptr: * mut int_ty!( $bytes)
137137 ) -> int_ty!( $bytes) {
138138 // We can't use `AtomicI8::compare_and_swap`; we *are* compare_and_swap.
139- unsafe { core:: arch:: naked_asm! {
139+ core:: arch:: naked_asm! {
140140 // UXT s(tmp0), s(0)
141141 concat!( uxt!( $bytes) , " " , reg!( $bytes, 16 ) , ", " , reg!( $bytes, 0 ) ) ,
142142 "0:" ,
@@ -150,7 +150,7 @@ macro_rules! compare_and_swap {
150150 "cbnz w17, 0b" ,
151151 "1:" ,
152152 "ret" ,
153- } }
153+ }
154154 }
155155 }
156156 } ;
@@ -165,7 +165,7 @@ macro_rules! compare_and_swap_i128 {
165165 pub unsafe extern "C" fn $name (
166166 expected: i128 , desired: i128 , ptr: * mut i128
167167 ) -> i128 {
168- unsafe { core:: arch:: naked_asm! {
168+ core:: arch:: naked_asm! {
169169 "mov x16, x0" ,
170170 "mov x17, x1" ,
171171 "0:" ,
@@ -179,7 +179,7 @@ macro_rules! compare_and_swap_i128 {
179179 "cbnz w15, 0b" ,
180180 "1:" ,
181181 "ret" ,
182- } }
182+ }
183183 }
184184 }
185185 } ;
@@ -194,7 +194,7 @@ macro_rules! swap {
194194 pub unsafe extern "C" fn $name (
195195 left: int_ty!( $bytes) , right_ptr: * mut int_ty!( $bytes)
196196 ) -> int_ty!( $bytes) {
197- unsafe { core:: arch:: naked_asm! {
197+ core:: arch:: naked_asm! {
198198 // mov s(tmp0), s(0)
199199 concat!( "mov " , reg!( $bytes, 16 ) , ", " , reg!( $bytes, 0 ) ) ,
200200 "0:" ,
@@ -204,7 +204,7 @@ macro_rules! swap {
204204 concat!( stxr!( $ordering, $bytes) , " w17, " , reg!( $bytes, 16 ) , ", [x1]" ) ,
205205 "cbnz w17, 0b" ,
206206 "ret" ,
207- } }
207+ }
208208 }
209209 }
210210 } ;
@@ -219,7 +219,7 @@ macro_rules! fetch_op {
219219 pub unsafe extern "C" fn $name (
220220 val: int_ty!( $bytes) , ptr: * mut int_ty!( $bytes)
221221 ) -> int_ty!( $bytes) {
222- unsafe { core:: arch:: naked_asm! {
222+ core:: arch:: naked_asm! {
223223 // mov s(tmp0), s(0)
224224 concat!( "mov " , reg!( $bytes, 16 ) , ", " , reg!( $bytes, 0 ) ) ,
225225 "0:" ,
@@ -231,7 +231,7 @@ macro_rules! fetch_op {
231231 concat!( stxr!( $ordering, $bytes) , " w15, " , reg!( $bytes, 17 ) , ", [x1]" ) ,
232232 "cbnz w15, 0b" ,
233233 "ret" ,
234- } }
234+ }
235235 }
236236 }
237237 }
0 commit comments