diff options
author | Scott Johnson <scott.johnson@arilinc.com> | 2021-01-27 16:16:29 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-27 16:16:29 -0800 |
commit | ad9420787c02c507242caa23230e1b23f2ca1b58 (patch) | |
tree | 4786a3850f342ca8b5b71e4b9d515b888e04df17 | |
parent | d6238d9945d029be956ae7c3e10b532b542e6f36 (diff) | |
download | spike-ad9420787c02c507242caa23230e1b23f2ca1b58.zip spike-ad9420787c02c507242caa23230e1b23f2ca1b58.tar.gz spike-ad9420787c02c507242caa23230e1b23f2ca1b58.tar.bz2 |
Increment minstret when WFI completes (#636)
See https://github.com/riscv/riscv-isa-manual/issues/189#issuecomment-768525017
-rw-r--r-- | riscv/execute.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv/execute.cc b/riscv/execute.cc index a810d53..51d75b5 100644 --- a/riscv/execute.cc +++ b/riscv/execute.cc @@ -371,7 +371,7 @@ void processor_t::step(size_t n) // In the debug ROM this prevents us from wasting time looping, but also // allows us to switch to other threads only once per idle loop in case // there is activity. - n = instret; + n = ++instret; } state.minstret += instret; |