diff options
author | David Li <li.davidm96@gmail.com> | 2016-01-13 09:25:57 -0700 |
---|---|---|
committer | David Li <li.davidm96@gmail.com> | 2016-01-13 09:25:57 -0700 |
commit | 36b21d7691bb452a68d857a71c16b9f922b047a2 (patch) | |
tree | c118bac1b35ea929351a5c714a49c37513fb72c0 /src/simulator.rs | |
parent | 4a56b90b38884ee006e0e9f3cba5474cab6654dd (diff) |
Pass MMU to syscall handler
Diffstat (limited to 'src/simulator.rs')
-rw-r--r-- | src/simulator.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/simulator.rs b/src/simulator.rs index 1c87d57..d625347 100644 --- a/src/simulator.rs +++ b/src/simulator.rs @@ -338,7 +338,9 @@ impl<'a> Core<'a> { }, isa::opcodes::SYSTEM => match inst.i_imm() { 0x0 => { - if let Some(trap) = system.syscall(self.id, &mut self.registers) { + let result = system.syscall(self.id, &mut self.registers, + &*self.mmu); + if let Some(trap) = result { self.trap(trap); } } |