@@ -131,7 +131,8 @@ macro_rules! compare_and_swap {
131
131
( $ordering: ident, $bytes: tt, $name: ident) => {
132
132
intrinsics! {
133
133
#[ maybe_use_optimized_c_shim]
134
- #[ unsafe ( naked) ]
134
+ #[ cfg_attr( bootstrap, naked) ]
135
+ #[ cfg_attr( not( bootstrap) , unsafe ( naked) ) ]
135
136
pub unsafe extern "C" fn $name (
136
137
expected: int_ty!( $bytes) , desired: int_ty!( $bytes) , ptr: * mut int_ty!( $bytes)
137
138
) -> int_ty!( $bytes) {
@@ -161,7 +162,8 @@ macro_rules! compare_and_swap_i128 {
161
162
( $ordering: ident, $name: ident) => {
162
163
intrinsics! {
163
164
#[ maybe_use_optimized_c_shim]
164
- #[ unsafe ( naked) ]
165
+ #[ cfg_attr( bootstrap, naked) ]
166
+ #[ cfg_attr( not( bootstrap) , unsafe ( naked) ) ]
165
167
pub unsafe extern "C" fn $name (
166
168
expected: i128 , desired: i128 , ptr: * mut i128
167
169
) -> i128 {
@@ -190,7 +192,8 @@ macro_rules! swap {
190
192
( $ordering: ident, $bytes: tt, $name: ident) => {
191
193
intrinsics! {
192
194
#[ maybe_use_optimized_c_shim]
193
- #[ unsafe ( naked) ]
195
+ #[ cfg_attr( bootstrap, naked) ]
196
+ #[ cfg_attr( not( bootstrap) , unsafe ( naked) ) ]
194
197
pub unsafe extern "C" fn $name (
195
198
left: int_ty!( $bytes) , right_ptr: * mut int_ty!( $bytes)
196
199
) -> int_ty!( $bytes) {
@@ -215,7 +218,8 @@ macro_rules! fetch_op {
215
218
( $ordering: ident, $bytes: tt, $name: ident, $op: literal) => {
216
219
intrinsics! {
217
220
#[ maybe_use_optimized_c_shim]
218
- #[ unsafe ( naked) ]
221
+ #[ cfg_attr( bootstrap, naked) ]
222
+ #[ cfg_attr( not( bootstrap) , unsafe ( naked) ) ]
219
223
pub unsafe extern "C" fn $name (
220
224
val: int_ty!( $bytes) , ptr: * mut int_ty!( $bytes)
221
225
) -> int_ty!( $bytes) {
0 commit comments