diff options
author | David Li <li.davidm96@gmail.com> | 2016-01-11 09:57:39 -0700 |
---|---|---|
committer | David Li <li.davidm96@gmail.com> | 2016-01-11 09:57:39 -0700 |
commit | b26175e8eb6b4e6b12a2478e1bb5321fc5af6b72 (patch) | |
tree | 54303cbb6f1f4e3cbad2e7545e8c12510b3e4a85 | |
parent | ab4ba59cca5094f15987ab16bddbd0ca4ea50a62 (diff) |
Correct ReverseMmu (map 0 to present address)
-rw-r--r-- | src/memory.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/memory.rs b/src/memory.rs index 768ce59..83f53af 100644 --- a/src/memory.rs +++ b/src/memory.rs @@ -155,7 +155,7 @@ impl ReverseMmu { impl Mmu for ReverseMmu { fn translate(&self, address: isa::Address) -> isa::Address { let offset = address % 4; - (self.top - (address - offset)) + offset + (self.top - 4 - (address - offset)) + offset } } |