projects
/
riscv-isa-sim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
56701b2
)
Execute exactly the # of insns passed to step()
author
Andrew Waterman
<waterman@cs.berkeley.edu>
Mon, 1 Jun 2015 01:10:20 +0000
(18:10 -0700)
committer
Andrew Waterman
<waterman@cs.berkeley.edu>
Mon, 1 Jun 2015 01:29:45 +0000
(18:29 -0700)
Previously, the value was treated as approximate.
riscv/processor.cc
patch
|
blob
|
history
diff --git
a/riscv/processor.cc
b/riscv/processor.cc
index 7162a393b30b407022922a1cff9fc45b48b1df8c..6368c8f18cc5ad3f3423894927c06043626cb6af 100644
(file)
--- a/
riscv/processor.cc
+++ b/
riscv/processor.cc
@@
-261,6
+261,7
@@
void processor_t::step(size_t n)
pc = execute_insn(this, pc, fetch); \
if (idx == mmu_t::ICACHE_ENTRIES-1) break; \
if (unlikely(ic_entry->tag != pc)) break; \
+ if (unlikely(instret+1 == n)) break; \
instret++; \
state.pc = pc; \
}