diff options
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/common.rs | 9 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/intrinsic.rs | 10 |
2 files changed, 11 insertions, 8 deletions
diff --git a/compiler/rustc_codegen_ssa/src/common.rs b/compiler/rustc_codegen_ssa/src/common.rs index 1574b30497b..8ca1a6084cf 100644 --- a/compiler/rustc_codegen_ssa/src/common.rs +++ b/compiler/rustc_codegen_ssa/src/common.rs @@ -11,6 +11,7 @@ use rustc_span::Span; use crate::base; use crate::traits::*; +#[derive(Copy, Clone)] pub enum IntPredicate { IntEQ, IntNE, @@ -24,6 +25,7 @@ pub enum IntPredicate { IntSLE, } +#[derive(Copy, Clone)] pub enum RealPredicate { RealPredicateFalse, RealOEQ, @@ -43,6 +45,7 @@ pub enum RealPredicate { RealPredicateTrue, } +#[derive(Copy, Clone)] pub enum AtomicRmwBinOp { AtomicXchg, AtomicAdd, @@ -57,17 +60,17 @@ pub enum AtomicRmwBinOp { AtomicUMin, } +#[derive(Copy, Clone)] pub enum AtomicOrdering { - NotAtomic, Unordered, - Monotonic, - // Consume, // Not specified yet. + Relaxed, Acquire, Release, AcquireRelease, SequentiallyConsistent, } +#[derive(Copy, Clone)] pub enum SynchronizationScope { SingleThread, CrossThread, diff --git a/compiler/rustc_codegen_ssa/src/mir/intrinsic.rs b/compiler/rustc_codegen_ssa/src/mir/intrinsic.rs index 6d6d3ae01f4..0ed4c3f1d94 100644 --- a/compiler/rustc_codegen_ssa/src/mir/intrinsic.rs +++ b/compiler/rustc_codegen_ssa/src/mir/intrinsic.rs @@ -388,17 +388,17 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { 2 => (SequentiallyConsistent, SequentiallyConsistent), 3 => match split[2] { "unordered" => (Unordered, Unordered), - "relaxed" => (Monotonic, Monotonic), + "relaxed" => (Relaxed, Relaxed), "acq" => (Acquire, Acquire), - "rel" => (Release, Monotonic), + "rel" => (Release, Relaxed), "acqrel" => (AcquireRelease, Acquire), - "failrelaxed" if is_cxchg => (SequentiallyConsistent, Monotonic), + "failrelaxed" if is_cxchg => (SequentiallyConsistent, Relaxed), "failacq" if is_cxchg => (SequentiallyConsistent, Acquire), _ => bx.sess().fatal("unknown ordering in atomic intrinsic"), }, 4 => match (split[2], split[3]) { - ("acq", "failrelaxed") if is_cxchg => (Acquire, Monotonic), - ("acqrel", "failrelaxed") if is_cxchg => (AcquireRelease, Monotonic), + ("acq", "failrelaxed") if is_cxchg => (Acquire, Relaxed), + ("acqrel", "failrelaxed") if is_cxchg => (AcquireRelease, Relaxed), _ => bx.sess().fatal("unknown ordering in atomic intrinsic"), }, _ => bx.sess().fatal("Atomic intrinsic not in correct format"), |
