about summary refs log tree commit diff
path: root/src/librustc_codegen_utils
diff options
context:
space:
mode:
authorDenis Merigoux <denis.merigoux@gmail.com>2018-09-28 12:18:03 +0200
committerEduard-Mihai Burtescu <edy.burt@gmail.com>2018-11-16 14:38:19 +0200
commit566fa4d003dd27c63a708a9e5e4e5c673a276f8d (patch)
tree9ab92193d202e1e9cd4517ed3d5f9c96e7dcec73 /src/librustc_codegen_utils
parent39fd4d92740ce4f838326fbaa101ba951b757e39 (diff)
downloadrust-566fa4d003dd27c63a708a9e5e4e5c673a276f8d.tar.gz
rust-566fa4d003dd27c63a708a9e5e4e5c673a276f8d.zip
Moved common.rs enums
Diffstat (limited to 'src/librustc_codegen_utils')
-rw-r--r--src/librustc_codegen_utils/common.rs78
1 files changed, 78 insertions, 0 deletions
diff --git a/src/librustc_codegen_utils/common.rs b/src/librustc_codegen_utils/common.rs
index b5640cfab38..5dc138b31ff 100644
--- a/src/librustc_codegen_utils/common.rs
+++ b/src/librustc_codegen_utils/common.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(non_camel_case_types, non_snake_case)]
+
 pub enum IntPredicate {
     IntEQ,
     IntNE,
@@ -20,3 +22,79 @@ pub enum IntPredicate {
     IntSLT,
     IntSLE
 }
+
+
+#[allow(dead_code)]
+pub enum RealPredicate {
+    RealPredicateFalse,
+    RealOEQ,
+    RealOGT,
+    RealOGE,
+    RealOLT,
+    RealOLE,
+    RealONE,
+    RealORD,
+    RealUNO,
+    RealUEQ,
+    RealUGT,
+    RealUGE,
+    RealULT,
+    RealULE,
+    RealUNE,
+    RealPredicateTrue
+}
+
+pub enum AtomicRmwBinOp {
+    AtomicXchg,
+    AtomicAdd,
+    AtomicSub,
+    AtomicAnd,
+    AtomicNand,
+    AtomicOr,
+    AtomicXor,
+    AtomicMax,
+    AtomicMin,
+    AtomicUMax,
+    AtomicUMin
+}
+
+pub enum AtomicOrdering {
+    #[allow(dead_code)]
+    NotAtomic,
+    Unordered,
+    Monotonic,
+    // Consume,  // Not specified yet.
+    Acquire,
+    Release,
+    AcquireRelease,
+    SequentiallyConsistent,
+}
+
+pub enum SynchronizationScope {
+    // FIXME: figure out if this variant is needed at all.
+    #[allow(dead_code)]
+    Other,
+    SingleThread,
+    CrossThread,
+}
+
+#[derive(Copy, Clone, PartialEq, Debug)]
+pub enum TypeKind {
+    Void,
+    Half,
+    Float,
+    Double,
+    X86_FP80,
+    FP128,
+    PPC_FP128,
+    Label,
+    Integer,
+    Function,
+    Struct,
+    Array,
+    Pointer,
+    Vector,
+    Metadata,
+    X86_MMX,
+    Token,
+}