aboutsummaryrefslogtreecommitdiff
path: root/riscv
diff options
context:
space:
mode:
authorScott Johnson <scott.johnson@arilinc.com>2022-08-23 10:51:24 -0700
committerScott Johnson <scott.johnson@arilinc.com>2022-08-23 11:35:49 -0700
commit2667f611fb258ffdfb7741521e6dd8aac61f30ea (patch)
treef25dafe0abe278b1c3bc39c2f6240000b0ecb4f5 /riscv
parent1556cf7fe2d8e31ca9e80b8e6e9eea7fbf12314d (diff)
downloadspike-2667f611fb258ffdfb7741521e6dd8aac61f30ea.zip
spike-2667f611fb258ffdfb7741521e6dd8aac61f30ea.tar.gz
spike-2667f611fb258ffdfb7741521e6dd8aac61f30ea.tar.bz2
Separate variables that contain two different things
No reason to use a variable misleadingly named 'paddr' to hold the virtual address.
Diffstat (limited to 'riscv')
-rw-r--r--riscv/mmu.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/riscv/mmu.h b/riscv/mmu.h
index 6f24ec7..db23892 100644
--- a/riscv/mmu.h
+++ b/riscv/mmu.h
@@ -263,8 +263,8 @@ public:
void clean_inval(reg_t addr, bool clean, bool inval) {
convert_load_traps_to_store_traps({
- reg_t paddr = addr & ~(blocksz - 1);
- paddr = translate(paddr, blocksz, LOAD, 0);
+ reg_t vaddr = addr & ~(blocksz - 1);
+ reg_t paddr = translate(vaddr, blocksz, LOAD, 0);
if (auto host_addr = sim->addr_to_mem(paddr)) {
if (tracer.interested_in_range(paddr, paddr + PGSIZE, LOAD))
tracer.clean_invalidate(paddr, blocksz, clean, inval);