1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
use crate*;
/*
use std::slice::Iter;
#[inline]
pub fn next_(i: &mut Iter<InstExpr>) -> InstExpr {
i.next().unwrap().clone()
}
#[inline]
pub fn combinat_offset(i: InstExpr, i1: InstExpr) -> InstExpr {
let reg = if let InstExpr::Reg(x) = i1 {
x
} else {
unreachable!()
};
if let InstExpr::RealTimeOffset(x) = i {
let r = match x {
Offset::Rf(v, _) => Offset::Rf(v, Some(reg)),
Offset::Imm(v, _) => Offset::Imm(v, Some(reg)),
};
return InstExpr::RealTimeOffset(r);
}
unreachable!()
}
#[inline]
pub fn create_reg(i: u8) -> InstExpr {
InstExpr::Reg(Register::new(i))
}
#[inline]
pub fn create_imm(i: &str) -> InstExpr {
InstExpr::RealTimeOffset(Offset::Imm(Symbol(i.to_string(), 0), None))
}
// */