@@ -2649,22 +2649,30 @@ unsafe fn atomic_compare_exchange<T: Copy>(
2649
2649
let ( val, ok) = unsafe {
2650
2650
match ( success, failure) {
2651
2651
( Relaxed , Relaxed ) => intrinsics:: atomic_cxchg_relaxed_relaxed ( dst, old, new) ,
2652
+ #[ cfg( not( bootstrap) ) ]
2652
2653
( Relaxed , Acquire ) => intrinsics:: atomic_cxchg_relaxed_acquire ( dst, old, new) ,
2654
+ #[ cfg( not( bootstrap) ) ]
2653
2655
( Relaxed , SeqCst ) => intrinsics:: atomic_cxchg_relaxed_seqcst ( dst, old, new) ,
2654
2656
( Acquire , Relaxed ) => intrinsics:: atomic_cxchg_acquire_relaxed ( dst, old, new) ,
2655
2657
( Acquire , Acquire ) => intrinsics:: atomic_cxchg_acquire_acquire ( dst, old, new) ,
2658
+ #[ cfg( not( bootstrap) ) ]
2656
2659
( Acquire , SeqCst ) => intrinsics:: atomic_cxchg_acquire_seqcst ( dst, old, new) ,
2657
2660
( Release , Relaxed ) => intrinsics:: atomic_cxchg_release_relaxed ( dst, old, new) ,
2661
+ #[ cfg( not( bootstrap) ) ]
2658
2662
( Release , Acquire ) => intrinsics:: atomic_cxchg_release_acquire ( dst, old, new) ,
2663
+ #[ cfg( not( bootstrap) ) ]
2659
2664
( Release , SeqCst ) => intrinsics:: atomic_cxchg_release_seqcst ( dst, old, new) ,
2660
2665
( AcqRel , Relaxed ) => intrinsics:: atomic_cxchg_acqrel_relaxed ( dst, old, new) ,
2661
2666
( AcqRel , Acquire ) => intrinsics:: atomic_cxchg_acqrel_acquire ( dst, old, new) ,
2667
+ #[ cfg( not( bootstrap) ) ]
2662
2668
( AcqRel , SeqCst ) => intrinsics:: atomic_cxchg_acqrel_seqcst ( dst, old, new) ,
2663
2669
( SeqCst , Relaxed ) => intrinsics:: atomic_cxchg_seqcst_relaxed ( dst, old, new) ,
2664
2670
( SeqCst , Acquire ) => intrinsics:: atomic_cxchg_seqcst_acquire ( dst, old, new) ,
2665
2671
( SeqCst , SeqCst ) => intrinsics:: atomic_cxchg_seqcst_seqcst ( dst, old, new) ,
2666
2672
( _, AcqRel ) => panic ! ( "there is no such thing as an acquire-release failure ordering" ) ,
2667
2673
( _, Release ) => panic ! ( "there is no such thing as a release failure ordering" ) ,
2674
+ #[ cfg( bootstrap) ]
2675
+ _ => panic ! ( "a failure ordering can't be stronger than a success ordering" ) ,
2668
2676
}
2669
2677
} ;
2670
2678
if ok { Ok ( val) } else { Err ( val) }
@@ -2683,22 +2691,30 @@ unsafe fn atomic_compare_exchange_weak<T: Copy>(
2683
2691
let ( val, ok) = unsafe {
2684
2692
match ( success, failure) {
2685
2693
( Relaxed , Relaxed ) => intrinsics:: atomic_cxchgweak_relaxed_relaxed ( dst, old, new) ,
2694
+ #[ cfg( not( bootstrap) ) ]
2686
2695
( Relaxed , Acquire ) => intrinsics:: atomic_cxchgweak_relaxed_acquire ( dst, old, new) ,
2696
+ #[ cfg( not( bootstrap) ) ]
2687
2697
( Relaxed , SeqCst ) => intrinsics:: atomic_cxchgweak_relaxed_seqcst ( dst, old, new) ,
2688
2698
( Acquire , Relaxed ) => intrinsics:: atomic_cxchgweak_acquire_relaxed ( dst, old, new) ,
2689
2699
( Acquire , Acquire ) => intrinsics:: atomic_cxchgweak_acquire_acquire ( dst, old, new) ,
2700
+ #[ cfg( not( bootstrap) ) ]
2690
2701
( Acquire , SeqCst ) => intrinsics:: atomic_cxchgweak_acquire_seqcst ( dst, old, new) ,
2691
2702
( Release , Relaxed ) => intrinsics:: atomic_cxchgweak_release_relaxed ( dst, old, new) ,
2703
+ #[ cfg( not( bootstrap) ) ]
2692
2704
( Release , Acquire ) => intrinsics:: atomic_cxchgweak_release_acquire ( dst, old, new) ,
2705
+ #[ cfg( not( bootstrap) ) ]
2693
2706
( Release , SeqCst ) => intrinsics:: atomic_cxchgweak_release_seqcst ( dst, old, new) ,
2694
2707
( AcqRel , Relaxed ) => intrinsics:: atomic_cxchgweak_acqrel_relaxed ( dst, old, new) ,
2695
2708
( AcqRel , Acquire ) => intrinsics:: atomic_cxchgweak_acqrel_acquire ( dst, old, new) ,
2709
+ #[ cfg( not( bootstrap) ) ]
2696
2710
( AcqRel , SeqCst ) => intrinsics:: atomic_cxchgweak_acqrel_seqcst ( dst, old, new) ,
2697
2711
( SeqCst , Relaxed ) => intrinsics:: atomic_cxchgweak_seqcst_relaxed ( dst, old, new) ,
2698
2712
( SeqCst , Acquire ) => intrinsics:: atomic_cxchgweak_seqcst_acquire ( dst, old, new) ,
2699
2713
( SeqCst , SeqCst ) => intrinsics:: atomic_cxchgweak_seqcst_seqcst ( dst, old, new) ,
2700
2714
( _, AcqRel ) => panic ! ( "there is no such thing as an acquire-release failure ordering" ) ,
2701
2715
( _, Release ) => panic ! ( "there is no such thing as a release failure ordering" ) ,
2716
+ #[ cfg( bootstrap) ]
2717
+ _ => panic ! ( "a failure ordering can't be stronger than a success ordering" ) ,
2702
2718
}
2703
2719
} ;
2704
2720
if ok { Ok ( val) } else { Err ( val) }
0 commit comments