@@ -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::asm ! {
139+ unsafe { 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,6 @@ macro_rules! compare_and_swap {
150150 "cbnz w17, 0b",
151151 "1:",
152152 "ret",
153- options(noreturn)
154153 } }
155154 }
156155 }
@@ -166,7 +165,7 @@ macro_rules! compare_and_swap_i128 {
166165 pub unsafe extern "C" fn $name (
167166 expected: i128, desired: i128, ptr: *mut i128
168167 ) -> i128 {
169- unsafe { core::arch::asm ! {
168+ unsafe { core::arch::naked_asm ! {
170169 "mov x16, x0",
171170 "mov x17, x1",
172171 "0:",
@@ -180,7 +179,6 @@ macro_rules! compare_and_swap_i128 {
180179 "cbnz w15, 0b",
181180 "1:",
182181 "ret",
183- options(noreturn)
184182 } }
185183 }
186184 }
@@ -196,7 +194,7 @@ macro_rules! swap {
196194 pub unsafe extern "C" fn $name (
197195 left: int_ty!($bytes), right_ptr: *mut int_ty!($bytes)
198196 ) -> int_ty!($bytes) {
199- unsafe { core::arch::asm ! {
197+ unsafe { core::arch::naked_asm ! {
200198 // mov s(tmp0), s(0)
201199 concat!("mov ", reg!($bytes, 16), ", ", reg!($bytes, 0)),
202200 "0:",
@@ -206,7 +204,6 @@ macro_rules! swap {
206204 concat!(stxr!($ordering, $bytes), " w17, ", reg!($bytes, 16), ", [x1]"),
207205 "cbnz w17, 0b",
208206 "ret",
209- options(noreturn)
210207 } }
211208 }
212209 }
@@ -222,7 +219,7 @@ macro_rules! fetch_op {
222219 pub unsafe extern "C" fn $name (
223220 val: int_ty!($bytes), ptr: *mut int_ty!($bytes)
224221 ) -> int_ty!($bytes) {
225- unsafe { core::arch::asm ! {
222+ unsafe { core::arch::naked_asm ! {
226223 // mov s(tmp0), s(0)
227224 concat!("mov ", reg!($bytes, 16), ", ", reg!($bytes, 0)),
228225 "0:",
@@ -234,7 +231,6 @@ macro_rules! fetch_op {
234231 concat!(stxr!($ordering, $bytes), " w15, ", reg!($bytes, 17), ", [x1]"),
235232 "cbnz w15, 0b",
236233 "ret",
237- options(noreturn)
238234 } }
239235 }
240236 }
0 commit comments