From 572ae3b22743018ea909b5f8d8a33d3d83392322 Mon Sep 17 00:00:00 2001 From: John Paul Adrian Glaubitz Date: Mon, 24 Jun 2024 16:33:24 +0200 Subject: [PATCH] rustc_data_structures: Use portable AtomicU64 on 32-bit SPARC While at it, order the list of architectures alphabetically. --- compiler/rustc_data_structures/Cargo.toml | 2 +- compiler/rustc_data_structures/src/marker.rs | 6 +++--- compiler/rustc_data_structures/src/sync.rs | 6 +++--- 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;