Update/add instructions in parser
* StoreImm just uses a u64 instead of u32 - we'll figure out the layout later * Jmp implementation added (can't believe I forgot this) * Add Inst AST item, whose immediates don't have to be a u64 right away Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -190,6 +190,10 @@ impl Vm {
|
||||
self.remove_flags(Flags::COMPARE);
|
||||
}
|
||||
}
|
||||
Inst::Jmp(r1) => {
|
||||
let w1 = self.get_reg(r1);
|
||||
self.set_reg(IP, w1);
|
||||
}
|
||||
Inst::Jz(r1) => {
|
||||
if !self.flags().contains(Flags::COMPARE) {
|
||||
let w1 = self.get_reg(r1);
|
||||
|
||||
Reference in New Issue
Block a user