2021-08-05 08:32:02 -05:00
|
|
|
From 6a4e6f5dc8c8a529a822eb9b57f9e57519595439 Mon Sep 17 00:00:00 2001
|
2021-02-18 11:32:40 -06:00
|
|
|
From: bjorn3 <bjorn3@users.noreply.github.com>
|
|
|
|
Date: Thu, 18 Feb 2021 18:45:28 +0100
|
|
|
|
Subject: [PATCH] Disable 128bit atomic operations
|
|
|
|
|
|
|
|
Cranelift doesn't support them yet
|
|
|
|
---
|
2021-08-05 08:32:02 -05:00
|
|
|
library/core/src/panic/unwind_safe.rs | 6 -----
|
|
|
|
library/core/src/sync/atomic.rs | 38 ---------------------------
|
|
|
|
library/core/tests/atomic.rs | 4 ---
|
2021-02-18 11:32:40 -06:00
|
|
|
3 files changed, 48 deletions(-)
|
|
|
|
|
2021-08-05 08:32:02 -05:00
|
|
|
diff --git a/library/core/src/panic/unwind_safe.rs b/library/core/src/panic/unwind_safe.rs
|
|
|
|
index 092b7cf..158cf71 100644
|
|
|
|
--- a/library/core/src/panic/unwind_safe.rs
|
|
|
|
+++ b/library/core/src/panic/unwind_safe.rs
|
|
|
|
@@ -216,9 +216,6 @@ impl RefUnwindSafe for crate::sync::atomic::AtomicI32 {}
|
|
|
|
#[cfg(target_has_atomic_load_store = "64")]
|
|
|
|
#[stable(feature = "integer_atomics_stable", since = "1.34.0")]
|
|
|
|
impl RefUnwindSafe for crate::sync::atomic::AtomicI64 {}
|
|
|
|
-#[cfg(target_has_atomic_load_store = "128")]
|
|
|
|
-#[unstable(feature = "integer_atomics", issue = "32976")]
|
|
|
|
-impl RefUnwindSafe for crate::sync::atomic::AtomicI128 {}
|
|
|
|
|
|
|
|
#[cfg(target_has_atomic_load_store = "ptr")]
|
|
|
|
#[stable(feature = "unwind_safe_atomic_refs", since = "1.14.0")]
|
|
|
|
@@ -235,9 +232,6 @@ impl RefUnwindSafe for crate::sync::atomic::AtomicU32 {}
|
|
|
|
#[cfg(target_has_atomic_load_store = "64")]
|
|
|
|
#[stable(feature = "integer_atomics_stable", since = "1.34.0")]
|
|
|
|
impl RefUnwindSafe for crate::sync::atomic::AtomicU64 {}
|
|
|
|
-#[cfg(target_has_atomic_load_store = "128")]
|
|
|
|
-#[unstable(feature = "integer_atomics", issue = "32976")]
|
|
|
|
-impl RefUnwindSafe for crate::sync::atomic::AtomicU128 {}
|
|
|
|
|
|
|
|
#[cfg(target_has_atomic_load_store = "8")]
|
|
|
|
#[stable(feature = "unwind_safe_atomic_refs", since = "1.14.0")]
|
2021-02-18 11:32:40 -06:00
|
|
|
diff --git a/library/core/src/sync/atomic.rs b/library/core/src/sync/atomic.rs
|
2021-08-05 08:32:02 -05:00
|
|
|
index 0194c58..25a0038 100644
|
2021-02-18 11:32:40 -06:00
|
|
|
--- a/library/core/src/sync/atomic.rs
|
|
|
|
+++ b/library/core/src/sync/atomic.rs
|
2021-08-05 08:32:02 -05:00
|
|
|
@@ -2229,44 +2229,6 @@ atomic_int! {
|
2021-02-18 11:32:40 -06:00
|
|
|
"AtomicU64::new(0)",
|
|
|
|
u64 AtomicU64 ATOMIC_U64_INIT
|
|
|
|
}
|
|
|
|
-#[cfg(target_has_atomic_load_store = "128")]
|
|
|
|
-atomic_int! {
|
|
|
|
- cfg(target_has_atomic = "128"),
|
|
|
|
- cfg(target_has_atomic_equal_alignment = "128"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- rustc_const_stable(feature = "const_integer_atomics", since = "1.34.0"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
2021-03-05 03:58:30 -06:00
|
|
|
- "i128",
|
2021-02-18 11:32:40 -06:00
|
|
|
- "#![feature(integer_atomics)]\n\n",
|
|
|
|
- atomic_min, atomic_max,
|
|
|
|
- 16,
|
|
|
|
- "AtomicI128::new(0)",
|
|
|
|
- i128 AtomicI128 ATOMIC_I128_INIT
|
|
|
|
-}
|
|
|
|
-#[cfg(target_has_atomic_load_store = "128")]
|
|
|
|
-atomic_int! {
|
|
|
|
- cfg(target_has_atomic = "128"),
|
|
|
|
- cfg(target_has_atomic_equal_alignment = "128"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
|
|
|
- rustc_const_stable(feature = "const_integer_atomics", since = "1.34.0"),
|
|
|
|
- unstable(feature = "integer_atomics", issue = "32976"),
|
2021-03-05 03:58:30 -06:00
|
|
|
- "u128",
|
2021-02-18 11:32:40 -06:00
|
|
|
- "#![feature(integer_atomics)]\n\n",
|
|
|
|
- atomic_umin, atomic_umax,
|
|
|
|
- 16,
|
|
|
|
- "AtomicU128::new(0)",
|
|
|
|
- u128 AtomicU128 ATOMIC_U128_INIT
|
|
|
|
-}
|
|
|
|
|
|
|
|
macro_rules! atomic_int_ptr_sized {
|
|
|
|
( $($target_pointer_width:literal $align:literal)* ) => { $(
|
|
|
|
diff --git a/library/core/tests/atomic.rs b/library/core/tests/atomic.rs
|
2021-08-05 08:32:02 -05:00
|
|
|
index b735957..ea728b6 100644
|
2021-02-18 11:32:40 -06:00
|
|
|
--- a/library/core/tests/atomic.rs
|
|
|
|
+++ b/library/core/tests/atomic.rs
|
2021-08-05 08:32:02 -05:00
|
|
|
@@ -185,10 +185,6 @@ fn atomic_alignment() {
|
2021-02-18 11:32:40 -06:00
|
|
|
assert_eq!(align_of::<AtomicU64>(), size_of::<AtomicU64>());
|
|
|
|
#[cfg(target_has_atomic = "64")]
|
|
|
|
assert_eq!(align_of::<AtomicI64>(), size_of::<AtomicI64>());
|
|
|
|
- #[cfg(target_has_atomic = "128")]
|
|
|
|
- assert_eq!(align_of::<AtomicU128>(), size_of::<AtomicU128>());
|
|
|
|
- #[cfg(target_has_atomic = "128")]
|
|
|
|
- assert_eq!(align_of::<AtomicI128>(), size_of::<AtomicI128>());
|
|
|
|
#[cfg(target_has_atomic = "ptr")]
|
|
|
|
assert_eq!(align_of::<AtomicUsize>(), size_of::<AtomicUsize>());
|
|
|
|
#[cfg(target_has_atomic = "ptr")]
|
|
|
|
--
|
|
|
|
2.26.2.7.g19db9cfb68
|
|
|
|
|