Skip to content

Commit f1f8689

Browse files
committed
Don't offset register addresses with block address
1 parent 9bd032e commit f1f8689

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/generate/iface/block.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ pub fn render(opts: &Options, ir: &IR, b: &Block, path: &str) -> Result<TokenStr
6060
#[inline(always)]
6161
pub fn #name(&mut self, n: usize) -> #ty {
6262
assert!(n < #len);
63-
#common_path::Reg::new(self.iface, (self.addr + #offset + #offs_expr) as #addr_ty)
63+
#common_path::Reg::new(self.iface, (#offset + #offs_expr) as #addr_ty)
6464
}
6565
));
6666
} else {
6767
items.extend(quote!(
6868
#doc
6969
#[inline(always)]
7070
pub fn #name(&mut self) -> #ty {
71-
#common_path::Reg::new(self.iface, (self.addr + #offset) as #addr_ty)
71+
#common_path::Reg::new(self.iface, (#offset) as #addr_ty)
7272
}
7373
));
7474
}

0 commit comments

Comments
 (0)