@@ -1951,8 +1951,7 @@ macro_rules! if_not_8_bit {
1951
1951
($_:ident, $($tt:tt)*) => { $($tt)* };
1952
1952
}
1953
1953
1954
- #[cfg_attr(not(bootstrap), cfg(target_has_atomic_load_store))]
1955
- #[cfg_attr(bootstrap, cfg(target_has_atomic_load_store = "8"))]
1954
+ #[cfg(target_has_atomic_load_store)]
1956
1955
macro_rules! atomic_int {
1957
1956
($cfg_cas:meta,
1958
1957
$cfg_align:meta,
@@ -3125,8 +3124,7 @@ atomic_int_ptr_sized! {
3125
3124
}
3126
3125
3127
3126
#[inline]
3128
- #[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3129
- #[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3127
+ #[cfg(target_has_atomic)]
3130
3128
fn strongest_failure_ordering(order: Ordering) -> Ordering {
3131
3129
match order {
3132
3130
Release => Relaxed,
@@ -3168,8 +3166,7 @@ unsafe fn atomic_load<T: Copy>(dst: *const T, order: Ordering) -> T {
3168
3166
}
3169
3167
3170
3168
#[inline]
3171
- #[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3172
- #[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3169
+ #[cfg(target_has_atomic)]
3173
3170
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
3174
3171
unsafe fn atomic_swap<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
3175
3172
// SAFETY: the caller must uphold the safety contract for `atomic_swap`.
@@ -3186,8 +3183,7 @@ unsafe fn atomic_swap<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
3186
3183
3187
3184
/// Returns the previous value (like __sync_fetch_and_add).
3188
3185
#[inline]
3189
- #[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3190
- #[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3186
+ #[cfg(target_has_atomic)]
3191
3187
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
3192
3188
unsafe fn atomic_add<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
3193
3189
// SAFETY: the caller must uphold the safety contract for `atomic_add`.
@@ -3204,8 +3200,7 @@ unsafe fn atomic_add<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
3204
3200
3205
3201
/// Returns the previous value (like __sync_fetch_and_sub).
3206
3202
#[inline]
3207
- #[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3208
- #[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3203
+ #[cfg(target_has_atomic)]
3209
3204
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
3210
3205
unsafe fn atomic_sub<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
3211
3206
// SAFETY: the caller must uphold the safety contract for `atomic_sub`.
@@ -3221,8 +3216,7 @@ unsafe fn atomic_sub<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
3221
3216
}
3222
3217
3223
3218
#[inline]
3224
- #[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3225
- #[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3219
+ #[cfg(target_has_atomic)]
3226
3220
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
3227
3221
unsafe fn atomic_compare_exchange<T: Copy>(
3228
3222
dst: *mut T,
@@ -3257,8 +3251,7 @@ unsafe fn atomic_compare_exchange<T: Copy>(
3257
3251
}
3258
3252
3259
3253
#[inline]
3260
- #[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3261
- #[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3254
+ #[cfg(target_has_atomic)]
3262
3255
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
3263
3256
unsafe fn atomic_compare_exchange_weak<T: Copy>(
3264
3257
dst: *mut T,
@@ -3293,8 +3286,7 @@ unsafe fn atomic_compare_exchange_weak<T: Copy>(
3293
3286
}
3294
3287
3295
3288
#[inline]
3296
- #[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3297
- #[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3289
+ #[cfg(target_has_atomic)]
3298
3290
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
3299
3291
unsafe fn atomic_and<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
3300
3292
// SAFETY: the caller must uphold the safety contract for `atomic_and`
@@ -3310,8 +3302,7 @@ unsafe fn atomic_and<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
3310
3302
}
3311
3303
3312
3304
#[inline]
3313
- #[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3314
- #[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3305
+ #[cfg(target_has_atomic)]
3315
3306
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
3316
3307
unsafe fn atomic_nand<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
3317
3308
// SAFETY: the caller must uphold the safety contract for `atomic_nand`
@@ -3327,8 +3318,7 @@ unsafe fn atomic_nand<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
3327
3318
}
3328
3319
3329
3320
#[inline]
3330
- #[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3331
- #[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3321
+ #[cfg(target_has_atomic)]
3332
3322
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
3333
3323
unsafe fn atomic_or<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
3334
3324
// SAFETY: the caller must uphold the safety contract for `atomic_or`
@@ -3344,8 +3334,7 @@ unsafe fn atomic_or<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
3344
3334
}
3345
3335
3346
3336
#[inline]
3347
- #[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3348
- #[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3337
+ #[cfg(target_has_atomic)]
3349
3338
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
3350
3339
unsafe fn atomic_xor<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
3351
3340
// SAFETY: the caller must uphold the safety contract for `atomic_xor`
@@ -3362,8 +3351,7 @@ unsafe fn atomic_xor<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
3362
3351
3363
3352
/// returns the max value (signed comparison)
3364
3353
#[inline]
3365
- #[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3366
- #[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3354
+ #[cfg(target_has_atomic)]
3367
3355
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
3368
3356
unsafe fn atomic_max<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
3369
3357
// SAFETY: the caller must uphold the safety contract for `atomic_max`
@@ -3380,8 +3368,7 @@ unsafe fn atomic_max<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
3380
3368
3381
3369
/// returns the min value (signed comparison)
3382
3370
#[inline]
3383
- #[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3384
- #[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3371
+ #[cfg(target_has_atomic)]
3385
3372
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
3386
3373
unsafe fn atomic_min<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
3387
3374
// SAFETY: the caller must uphold the safety contract for `atomic_min`
@@ -3398,8 +3385,7 @@ unsafe fn atomic_min<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
3398
3385
3399
3386
/// returns the max value (unsigned comparison)
3400
3387
#[inline]
3401
- #[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3402
- #[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3388
+ #[cfg(target_has_atomic)]
3403
3389
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
3404
3390
unsafe fn atomic_umax<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
3405
3391
// SAFETY: the caller must uphold the safety contract for `atomic_umax`
@@ -3416,8 +3402,7 @@ unsafe fn atomic_umax<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
3416
3402
3417
3403
/// returns the min value (unsigned comparison)
3418
3404
#[inline]
3419
- #[cfg_attr(not(bootstrap), cfg(target_has_atomic))]
3420
- #[cfg_attr(bootstrap, cfg(target_has_atomic = "8"))]
3405
+ #[cfg(target_has_atomic)]
3421
3406
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
3422
3407
unsafe fn atomic_umin<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
3423
3408
// SAFETY: the caller must uphold the safety contract for `atomic_umin`
0 commit comments