]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_codegen_cranelift/patches/0027-Disable-128bit-atomic-operations.patch
Auto merge of #82356 - camelid:render-cleanup, r=GuillaumeGomez
[rust.git] / compiler / rustc_codegen_cranelift / patches / 0027-Disable-128bit-atomic-operations.patch
1 From 894e07dfec2624ba539129b1c1d63e1d7d812bda Mon Sep 17 00:00:00 2001
2 From: bjorn3 <bjorn3@users.noreply.github.com>
3 Date: Thu, 18 Feb 2021 18:45:28 +0100
4 Subject: [PATCH] Disable 128bit atomic operations
5
6 Cranelift doesn't support them yet
7 ---
8  library/core/src/sync/atomic.rs | 38 ---------------------------------
9  library/core/tests/atomic.rs    |  4 ----
10  library/std/src/panic.rs        |  6 ------
11  3 files changed, 48 deletions(-)
12
13 diff --git a/library/core/src/sync/atomic.rs b/library/core/src/sync/atomic.rs
14 index 81c9e1d..65c9503 100644
15 --- a/library/core/src/sync/atomic.rs
16 +++ b/library/core/src/sync/atomic.rs
17 @@ -2228,44 +2228,6 @@ atomic_int! {
18      "AtomicU64::new(0)",
19      u64 AtomicU64 ATOMIC_U64_INIT
20  }
21 -#[cfg(target_has_atomic_load_store = "128")]
22 -atomic_int! {
23 -    cfg(target_has_atomic = "128"),
24 -    cfg(target_has_atomic_equal_alignment = "128"),
25 -    unstable(feature = "integer_atomics", issue = "32976"),
26 -    unstable(feature = "integer_atomics", issue = "32976"),
27 -    unstable(feature = "integer_atomics", issue = "32976"),
28 -    unstable(feature = "integer_atomics", issue = "32976"),
29 -    unstable(feature = "integer_atomics", issue = "32976"),
30 -    unstable(feature = "integer_atomics", issue = "32976"),
31 -    rustc_const_stable(feature = "const_integer_atomics", since = "1.34.0"),
32 -    unstable(feature = "integer_atomics", issue = "32976"),
33 -    "i128",
34 -    "#![feature(integer_atomics)]\n\n",
35 -    atomic_min, atomic_max,
36 -    16,
37 -    "AtomicI128::new(0)",
38 -    i128 AtomicI128 ATOMIC_I128_INIT
39 -}
40 -#[cfg(target_has_atomic_load_store = "128")]
41 -atomic_int! {
42 -    cfg(target_has_atomic = "128"),
43 -    cfg(target_has_atomic_equal_alignment = "128"),
44 -    unstable(feature = "integer_atomics", issue = "32976"),
45 -    unstable(feature = "integer_atomics", issue = "32976"),
46 -    unstable(feature = "integer_atomics", issue = "32976"),
47 -    unstable(feature = "integer_atomics", issue = "32976"),
48 -    unstable(feature = "integer_atomics", issue = "32976"),
49 -    unstable(feature = "integer_atomics", issue = "32976"),
50 -    rustc_const_stable(feature = "const_integer_atomics", since = "1.34.0"),
51 -    unstable(feature = "integer_atomics", issue = "32976"),
52 -    "u128",
53 -    "#![feature(integer_atomics)]\n\n",
54 -    atomic_umin, atomic_umax,
55 -    16,
56 -    "AtomicU128::new(0)",
57 -    u128 AtomicU128 ATOMIC_U128_INIT
58 -}
59  
60  macro_rules! atomic_int_ptr_sized {
61      ( $($target_pointer_width:literal $align:literal)* ) => { $(
62 diff --git a/library/core/tests/atomic.rs b/library/core/tests/atomic.rs
63 index 2d1e449..cb6da5d 100644
64 --- a/library/core/tests/atomic.rs
65 +++ b/library/core/tests/atomic.rs
66 @@ -145,10 +145,6 @@ fn atomic_alignment() {
67      assert_eq!(align_of::<AtomicU64>(), size_of::<AtomicU64>());
68      #[cfg(target_has_atomic = "64")]
69      assert_eq!(align_of::<AtomicI64>(), size_of::<AtomicI64>());
70 -    #[cfg(target_has_atomic = "128")]
71 -    assert_eq!(align_of::<AtomicU128>(), size_of::<AtomicU128>());
72 -    #[cfg(target_has_atomic = "128")]
73 -    assert_eq!(align_of::<AtomicI128>(), size_of::<AtomicI128>());
74      #[cfg(target_has_atomic = "ptr")]
75      assert_eq!(align_of::<AtomicUsize>(), size_of::<AtomicUsize>());
76      #[cfg(target_has_atomic = "ptr")]
77 diff --git a/library/std/src/panic.rs b/library/std/src/panic.rs
78 index 89a822a..779fd88 100644
79 --- a/library/std/src/panic.rs
80 +++ b/library/std/src/panic.rs
81 @@ -279,9 +279,6 @@ impl RefUnwindSafe for atomic::AtomicI32 {}
82  #[cfg(target_has_atomic_load_store = "64")]
83  #[stable(feature = "integer_atomics_stable", since = "1.34.0")]
84  impl RefUnwindSafe for atomic::AtomicI64 {}
85 -#[cfg(target_has_atomic_load_store = "128")]
86 -#[unstable(feature = "integer_atomics", issue = "32976")]
87 -impl RefUnwindSafe for atomic::AtomicI128 {}
88  
89  #[cfg(target_has_atomic_load_store = "ptr")]
90  #[stable(feature = "unwind_safe_atomic_refs", since = "1.14.0")]
91 @@ -298,9 +295,6 @@ impl RefUnwindSafe for atomic::AtomicU32 {}
92  #[cfg(target_has_atomic_load_store = "64")]
93  #[stable(feature = "integer_atomics_stable", since = "1.34.0")]
94  impl RefUnwindSafe for atomic::AtomicU64 {}
95 -#[cfg(target_has_atomic_load_store = "128")]
96 -#[unstable(feature = "integer_atomics", issue = "32976")]
97 -impl RefUnwindSafe for atomic::AtomicU128 {}
98  
99  #[cfg(target_has_atomic_load_store = "8")]
100  #[stable(feature = "unwind_safe_atomic_refs", since = "1.14.0")]
101 -- 
102 2.26.2.7.g19db9cfb68
103