aboutsummaryrefslogtreecommitdiff
path: root/riscv/cachesim.cc
diff options
context:
space:
mode:
authorWei Song <wsong83@gmail.com>2015-04-13 16:35:13 +0100
committerWei Song <wsong83@gmail.com>2015-04-13 16:35:13 +0100
commitdb428184208c7a57052d4d7cc994f1e4b3664969 (patch)
tree8f798aa2b963d4355d19b7ff2201ab7b80e54408 /riscv/cachesim.cc
parent60535c23a2f8532d901e92d45a959a4d0a597dff (diff)
downloadspike-db428184208c7a57052d4d7cc994f1e4b3664969.zip
spike-db428184208c7a57052d4d7cc994f1e4b3664969.tar.gz
spike-db428184208c7a57052d4d7cc994f1e4b3664969.tar.bz2
fix cache line index offset in cachesim.cc
Diffstat (limited to 'riscv/cachesim.cc')
-rw-r--r--riscv/cachesim.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv/cachesim.cc b/riscv/cachesim.cc
index 9a11187..90ab5be 100644
--- a/riscv/cachesim.cc
+++ b/riscv/cachesim.cc
@@ -45,7 +45,7 @@ void cache_sim_t::init()
help();
idx_shift = 0;
- for (size_t x = linesz; x; x >>= 1)
+ for (size_t x = linesz; x>1; x >>= 1)
idx_shift++;
tags = new uint64_t[sets*ways]();