]>
Witch of Git - jade-mouse/blob - toolchain/src/inst.rs
4 use std
::cmp
::PartialEq
;
6 #[derive(Clone, Copy, Debug, PartialOrd, Ord, PartialEq, Eq)]
14 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
21 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
29 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
38 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
45 // These are preliminary
51 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
53 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
55 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
57 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
59 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
61 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
64 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
71 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
78 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
90 #[derive(Clone, Copy, Debug, Eq)]
100 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
108 Mem(LdSt
, Reg
, Addr
),
112 LdImm(Half
, Reg
, U8
),
115 impl PartialEq
for Cond
{
116 fn eq(&self, other
: &Cond
) -> bool
{
118 match (self, other
) {
119 (Eq(a1
, b1
), Eq(a2
, b2
)) => (a1
, b1
) == (a2
, b2
) || (a1
, b1
) == (b2
, a2
),
120 (Ne(a1
, b1
), Ne(a2
, b2
)) => (a1
, b1
) == (a2
, b2
) || (a1
, b1
) == (b2
, a2
),
121 (Test(a1
, b1
), Test(a2
, b2
)) => (a1
, b1
) == (a2
, b2
) || (a1
, b1
) == (b2
, a2
),
122 (TestNot(a1
, b1
), TestNot(a2
, b2
)) => (a1
, b1
) == (a2
, b2
) || (a1
, b1
) == (b2
, a2
),
123 (Lt(a1
, b1
), Lt(a2
, b2
)) => (a1
, b1
) == (a2
, b2
),
124 (Ult(a1
, b1
), Ult(a2
, b2
)) => (a1
, b1
) == (a2
, b2
),