about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>2024-06-24 16:33:24 +0200
committerJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>2024-06-24 16:52:19 +0200
commit572ae3b22743018ea909b5f8d8a33d3d83392322 (patch)
treed30bae7b26f537d0ff91aac6310739072e881a45
parent06c072f158c91296a2f802f2a10c9fe2499f314d (diff)
downloadrust-572ae3b22743018ea909b5f8d8a33d3d83392322.tar.gz
rust-572ae3b22743018ea909b5f8d8a33d3d83392322.zip
rustc_data_structures: Use portable AtomicU64 on 32-bit SPARC
While at it, order the list of architectures alphabetically.
-rw-r--r--compiler/rustc_data_structures/Cargo.toml2
-rw-r--r--compiler/rustc_data_structures/src/marker.rs6
-rw-r--r--compiler/rustc_data_structures/src/sync.rs6
3 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_data_structures/Cargo.toml b/compiler/rustc_data_structures/Cargo.toml
index ff0a94f8e9b..f525510030b 100644
--- a/compiler/rustc_data_structures/Cargo.toml
+++ b/compiler/rustc_data_structures/Cargo.toml
@@ -50,7 +50,7 @@ libc = "0.2"
 memmap2 = "0.2.1"
 # tidy-alphabetical-end
 
-[target.'cfg(any(target_arch = "powerpc", target_arch = "mips"))'.dependencies]
+[target.'cfg(any(target_arch = "mips", target_arch = "powerpc", target_arch = "sparc"))'.dependencies]
 portable-atomic = "1.5.1"
 
 [features]
diff --git a/compiler/rustc_data_structures/src/marker.rs b/compiler/rustc_data_structures/src/marker.rs
index a9ccfbed411..32fad0de1aa 100644
--- a/compiler/rustc_data_structures/src/marker.rs
+++ b/compiler/rustc_data_structures/src/marker.rs
@@ -147,14 +147,14 @@ cfg_match! {
             [crate::owned_slice::OwnedSlice]
         );
 
-        // PowerPC and MIPS platforms with 32-bit pointers do not
+        // MIPS, PowerPC and SPARC platforms with 32-bit pointers do not
         // have AtomicU64 type.
-        #[cfg(not(any(target_arch = "powerpc", target_arch = "mips")))]
+        #[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc", target_arch = "sparc")))]
         already_sync!(
             [std::sync::atomic::AtomicU64]
         );
 
-        #[cfg(any(target_arch = "powerpc", target_arch = "mips"))]
+        #[cfg(any(target_arch = "mips", target_arch = "powerpc", target_arch = "sparc"))]
         already_sync!(
             [portable_atomic::AtomicU64]
         );
diff --git a/compiler/rustc_data_structures/src/sync.rs b/compiler/rustc_data_structures/src/sync.rs
index ecb85db33f7..5ae79ca988f 100644
--- a/compiler/rustc_data_structures/src/sync.rs
+++ b/compiler/rustc_data_structures/src/sync.rs
@@ -270,12 +270,12 @@ cfg_match! {
 
         pub use std::sync::atomic::{AtomicBool, AtomicUsize, AtomicU32};
 
-        // PowerPC and MIPS platforms with 32-bit pointers do not
+        // MIPS, PowerPC and SPARC platforms with 32-bit pointers do not
         // have AtomicU64 type.
-        #[cfg(not(any(target_arch = "powerpc", target_arch = "mips")))]
+        #[cfg(not(any(target_arch = "mips", target_arch = "powerpc", target_arch = "sparc")))]
         pub use std::sync::atomic::AtomicU64;
 
-        #[cfg(any(target_arch = "powerpc", target_arch = "mips"))]
+        #[cfg(any(target_arch = "mips", target_arch = "powerpc", target_arch = "sparc"))]
         pub use portable_atomic::AtomicU64;
 
         pub use std::sync::Arc as Lrc;