remove 'unordered' atomic intrinsics

This commit is contained in:
Ralf Jung
2025-05-05 15:26:06 +02:00
parent 0eb0b8cb67
commit 79dfd0a472
5 changed files with 1 additions and 16 deletions
@@ -2454,7 +2454,6 @@ fn to_gcc(self) -> i32 {
use MemOrdering::*;
let ordering = match self {
AtomicOrdering::Unordered => __ATOMIC_RELAXED,
AtomicOrdering::Relaxed => __ATOMIC_RELAXED, // TODO(antoyo): check if that's the same.
AtomicOrdering::Acquire => __ATOMIC_ACQUIRE,
AtomicOrdering::Release => __ATOMIC_RELEASE,
+1 -1
View File
@@ -415,6 +415,7 @@ pub(crate) fn from_generic(op: rustc_codegen_ssa::common::AtomicRmwBinOp) -> Sel
pub(crate) enum AtomicOrdering {
#[allow(dead_code)]
NotAtomic = 0,
#[allow(dead_code)]
Unordered = 1,
Monotonic = 2,
// Consume = 3, // Not specified yet.
@@ -428,7 +429,6 @@ impl AtomicOrdering {
pub(crate) fn from_generic(ao: rustc_codegen_ssa::common::AtomicOrdering) -> Self {
use rustc_codegen_ssa::common::AtomicOrdering as Common;
match ao {
Common::Unordered => Self::Unordered,
Common::Relaxed => Self::Monotonic,
Common::Acquire => Self::Acquire,
Common::Release => Self::Release,
-1
View File
@@ -61,7 +61,6 @@ pub enum AtomicRmwBinOp {
#[derive(Copy, Clone, Debug)]
pub enum AtomicOrdering {
Unordered,
Relaxed,
Acquire,
Release,
@@ -336,7 +336,6 @@ pub fn codegen_intrinsic_call(
};
let parse_ordering = |bx: &Bx, s| match s {
"unordered" => Unordered,
"relaxed" => Relaxed,
"acquire" => Acquire,
"release" => Release,
-12
View File
@@ -439,12 +439,6 @@ pub unsafe fn atomic_cxchgweak_release_acquire<T: Copy>(
#[rustc_intrinsic]
#[rustc_nounwind]
pub unsafe fn atomic_load_relaxed<T: Copy>(src: *const T) -> T;
/// Do NOT use this intrinsic; "unordered" operations do not exist in our memory model!
/// In terms of the Rust Abstract Machine, this operation is equivalent to `src.read()`,
/// i.e., it performs a non-atomic read.
#[rustc_intrinsic]
#[rustc_nounwind]
pub unsafe fn atomic_load_unordered<T: Copy>(src: *const T) -> T;
/// Stores the value at the specified memory location.
/// `T` must be an integer or pointer type.
@@ -473,12 +467,6 @@ pub unsafe fn atomic_cxchgweak_release_acquire<T: Copy>(
#[rustc_intrinsic]
#[rustc_nounwind]
pub unsafe fn atomic_store_relaxed<T: Copy>(dst: *mut T, val: T);
/// Do NOT use this intrinsic; "unordered" operations do not exist in our memory model!
/// In terms of the Rust Abstract Machine, this operation is equivalent to `dst.write(val)`,
/// i.e., it performs a non-atomic write.
#[rustc_intrinsic]
#[rustc_nounwind]
pub unsafe fn atomic_store_unordered<T: Copy>(dst: *mut T, val: T);
/// Stores the value at the specified memory location, returning the old value.
/// `T` must be an integer or pointer type.