1
- From 6a4e6f5dc8c8a529a822eb9b57f9e57519595439 Mon Sep 17 00:00:00 2001
1
+ From ad7ffe71baba46865f2e65266ab025920dfdc20b Mon Sep 17 00:00:00 2001
2
2
From: bjorn3 <bjorn3@users.noreply.github.com>
3
3
Date: Thu, 18 Feb 2021 18:45:28 +0100
4
4
Subject: [PATCH] Disable 128bit atomic operations
@@ -8,7 +8,8 @@ Cranelift doesn't support them yet
8
8
library/core/src/panic/unwind_safe.rs | 6 -----
9
9
library/core/src/sync/atomic.rs | 38 ---------------------------
10
10
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(-)
12
13
13
14
diff --git a/library/core/src/panic/unwind_safe.rs b/library/core/src/panic/unwind_safe.rs
14
15
index 092b7cf..158cf71 100644
@@ -35,10 +36,10 @@ index 092b7cf..158cf71 100644
35
36
#[cfg(target_has_atomic_load_store = "8")]
36
37
#[stable(feature = "unwind_safe_atomic_refs", since = "1.14.0")]
37
38
diff --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
39
40
--- a/library/core/src/sync/atomic.rs
40
41
+++ b/library/core/src/sync/atomic.rs
41
- @@ -2229 ,44 +2229 ,6 @@ atomic_int! {
42
+ @@ -2234 ,44 +2234 ,6 @@ atomic_int! {
42
43
"AtomicU64::new(0)",
43
44
u64 AtomicU64 ATOMIC_U64_INIT
44
45
}
@@ -98,6 +99,38 @@ index b735957..ea728b6 100644
98
99
#[cfg(target_has_atomic = "ptr")]
99
100
assert_eq!(align_of::<AtomicUsize>(), size_of::<AtomicUsize>());
100
101
#[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;
101
134
- -
102
135
2.26.2.7.g19db9cfb68
103
136
0 commit comments