1- From 6a4e6f5dc8c8a529a822eb9b57f9e57519595439 Mon Sep 17 00:00:00 2001
1+ From ad7ffe71baba46865f2e65266ab025920dfdc20b Mon Sep 17 00:00:00 2001
22From: bjorn3 <bjorn3@users.noreply.github.com>
33Date: Thu, 18 Feb 2021 18:45:28 +0100
44Subject: [PATCH] Disable 128bit atomic operations
@@ -8,7 +8,8 @@ Cranelift doesn't support them yet
88 library/core/src/panic/unwind_safe.rs | 6 -----
99 library/core/src/sync/atomic.rs | 38 ---------------------------
1010 library/core/tests/atomic.rs | 4 ---
11- 3 files changed, 48 deletions(-)
11+ library/std/src/time/monotonic.rs | 6 +++--
12+ 4 files changed, 4 insertions(+), 50 deletions(-)
1213
1314diff --git a/library/core/src/panic/unwind_safe.rs b/library/core/src/panic/unwind_safe.rs
1415index 092b7cf..158cf71 100644
@@ -35,10 +36,10 @@ index 092b7cf..158cf71 100644
3536 #[cfg(target_has_atomic_load_store = "8")]
3637 #[stable(feature = "unwind_safe_atomic_refs", since = "1.14.0")]
3738diff --git a/library/core/src/sync/atomic.rs b/library/core/src/sync/atomic.rs
38- index 0194c58..25a0038 100644
39+ index d9de37e..8293fce 100644
3940--- a/library/core/src/sync/atomic.rs
4041+++ b/library/core/src/sync/atomic.rs
41- @@ -2229 ,44 +2229 ,6 @@ atomic_int! {
42+ @@ -2234 ,44 +2234 ,6 @@ atomic_int! {
4243 "AtomicU64::new(0)",
4344 u64 AtomicU64 ATOMIC_U64_INIT
4445 }
@@ -98,6 +99,38 @@ index b735957..ea728b6 100644
9899 #[cfg(target_has_atomic = "ptr")]
99100 assert_eq!(align_of::<AtomicUsize>(), size_of::<AtomicUsize>());
100101 #[cfg(target_has_atomic = "ptr")]
102+ diff --git a/library/std/src/time/monotonic.rs b/library/std/src/time/monotonic.rs
103+ index fa96b7a..2854f9c 100644
104+ --- a/library/std/src/time/monotonic.rs
105+ +++ b/library/std/src/time/monotonic.rs
106+ @@ -5,7 +5,7 @@ pub(super) fn monotonize(raw: time::Instant) -> time::Instant {
107+ inner::monotonize(raw)
108+ }
109+
110+ - #[cfg(all(target_has_atomic = "64", not(target_has_atomic = "128")))]
111+ + #[cfg(target_has_atomic = "64")]
112+ pub mod inner {
113+ use crate::sync::atomic::AtomicU64;
114+ use crate::sync::atomic::Ordering::*;
115+ @@ -70,6 +70,7 @@ pub mod inner {
116+ }
117+ }
118+
119+ + /*
120+ #[cfg(target_has_atomic = "128")]
121+ pub mod inner {
122+ use crate::sync::atomic::AtomicU128;
123+ @@ -94,8 +95,9 @@ pub mod inner {
124+ ZERO.checked_add_duration(&Duration::new(secs, nanos)).unwrap()
125+ }
126+ }
127+ + */
128+
129+ - #[cfg(not(any(target_has_atomic = "64", target_has_atomic = "128")))]
130+ + #[cfg(not(target_has_atomic = "64"))]
131+ pub mod inner {
132+ use crate::cmp;
133+ use crate::sys::time;
101134- -
1021352.26.2.7.g19db9cfb68
103136
0 commit comments