From f1f8689ae729cf844a5d0a1c223ba63b159a0839 Mon Sep 17 00:00:00 2001 From: Spinfast Date: Fri, 1 Dec 2023 23:40:21 -0600 Subject: [PATCH] Don't offset register addresses with block address --- src/generate/iface/block.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generate/iface/block.rs b/src/generate/iface/block.rs index fee695a..c1a6989 100644 --- a/src/generate/iface/block.rs +++ b/src/generate/iface/block.rs @@ -60,7 +60,7 @@ pub fn render(opts: &Options, ir: &IR, b: &Block, path: &str) -> Result #ty { assert!(n < #len); - #common_path::Reg::new(self.iface, (self.addr + #offset + #offs_expr) as #addr_ty) + #common_path::Reg::new(self.iface, (#offset + #offs_expr) as #addr_ty) } )); } else { @@ -68,7 +68,7 @@ pub fn render(opts: &Options, ir: &IR, b: &Block, path: &str) -> Result #ty { - #common_path::Reg::new(self.iface, (self.addr + #offset) as #addr_ty) + #common_path::Reg::new(self.iface, (#offset) as #addr_ty) } )); }