From b26175e8eb6b4e6b12a2478e1bb5321fc5af6b72 Mon Sep 17 00:00:00 2001 From: David Li Date: Mon, 11 Jan 2016 09:57:39 -0700 Subject: Correct ReverseMmu (map 0 to present address) --- src/memory.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 } } -- cgit v1.2.3