]>
Witch of Git - jade-rose/blob - toolchain/src/inst.rs
9 use proptest_derive
::Arbitrary
;
11 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
12 #[cfg_attr(test, derive(Arbitrary))]
25 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
26 #[cfg_attr(test, derive(Arbitrary))]
39 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
40 #[cfg_attr(test, derive(Arbitrary))]
53 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
54 #[cfg_attr(test, derive(Arbitrary))]
61 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
62 #[cfg_attr(test, derive(Arbitrary))]
68 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
69 #[cfg_attr(test, derive(Arbitrary))]
71 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
72 #[cfg_attr(test, derive(Arbitrary))]
73 pub struct U3(#[cfg_attr(test, proptest(strategy = "0..=7u8"))] u8);
74 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
75 #[cfg_attr(test, derive(Arbitrary))]
76 pub struct AddImm(#[cfg_attr(test, proptest(strategy = "-64..=127i8"))] i8);
78 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
79 #[cfg_attr(test, derive(Arbitrary))]
88 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
89 #[cfg_attr(test, derive(Arbitrary))]
96 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
97 #[cfg_attr(test, derive(Arbitrary))]
98 #[cfg_attr(test, proptest(no_params))]
111 LdD(Data
, Reg
, bool
),
112 StD(Data
, Reg
, bool
),
118 pub fn new(x
: u8) -> Option
<Reg
> {
124 pub fn new(x
: u8) -> Option
<U3
> {
126 0..=7 => Some(U3(x
)),
133 pub fn new(x
: i8) -> Option
<AddImm
> {
135 -64..=127 => Some(AddImm(x
)),