@@ -131,7 +131,8 @@ macro_rules! compare_and_swap {
131131 ( $ordering: ident, $bytes: tt, $name: ident) => {
132132 intrinsics! {
133133 #[ maybe_use_optimized_c_shim]
134- #[ unsafe ( naked) ]
134+ #[ cfg_attr( bootstrap, naked) ]
135+ #[ cfg_attr( not( bootstrap) , unsafe ( naked) ) ]
135136 pub unsafe extern "C" fn $name (
136137 expected: int_ty!( $bytes) , desired: int_ty!( $bytes) , ptr: * mut int_ty!( $bytes)
137138 ) -> int_ty!( $bytes) {
@@ -161,7 +162,8 @@ macro_rules! compare_and_swap_i128 {
161162 ( $ordering: ident, $name: ident) => {
162163 intrinsics! {
163164 #[ maybe_use_optimized_c_shim]
164- #[ unsafe ( naked) ]
165+ #[ cfg_attr( bootstrap, naked) ]
166+ #[ cfg_attr( not( bootstrap) , unsafe ( naked) ) ]
165167 pub unsafe extern "C" fn $name (
166168 expected: i128 , desired: i128 , ptr: * mut i128
167169 ) -> i128 {
@@ -190,7 +192,8 @@ macro_rules! swap {
190192 ( $ordering: ident, $bytes: tt, $name: ident) => {
191193 intrinsics! {
192194 #[ maybe_use_optimized_c_shim]
193- #[ unsafe ( naked) ]
195+ #[ cfg_attr( bootstrap, naked) ]
196+ #[ cfg_attr( not( bootstrap) , unsafe ( naked) ) ]
194197 pub unsafe extern "C" fn $name (
195198 left: int_ty!( $bytes) , right_ptr: * mut int_ty!( $bytes)
196199 ) -> int_ty!( $bytes) {
@@ -215,7 +218,8 @@ macro_rules! fetch_op {
215218 ( $ordering: ident, $bytes: tt, $name: ident, $op: literal) => {
216219 intrinsics! {
217220 #[ maybe_use_optimized_c_shim]
218- #[ unsafe ( naked) ]
221+ #[ cfg_attr( bootstrap, naked) ]
222+ #[ cfg_attr( not( bootstrap) , unsafe ( naked) ) ]
219223 pub unsafe extern "C" fn $name (
220224 val: int_ty!( $bytes) , ptr: * mut int_ty!( $bytes)
221225 ) -> int_ty!( $bytes) {
0 commit comments