aboutsummaryrefslogtreecommitdiff
path: root/riscv/execute.cc
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@cs.berkeley.edu>2016-08-25 20:24:14 -0700
committerAndrew Waterman <waterman@cs.berkeley.edu>2016-08-25 20:24:14 -0700
commitc8149cb261631aadfe6d984cb9b40b88bfb31408 (patch)
tree4a4bce6b25374a007f49708c85fbe94d796a2f08 /riscv/execute.cc
parentb3e6c1d9292b437c0d1b79799ac594df6a4a3ef0 (diff)
downloadspike-c8149cb261631aadfe6d984cb9b40b88bfb31408.zip
spike-c8149cb261631aadfe6d984cb9b40b88bfb31408.tar.gz
spike-c8149cb261631aadfe6d984cb9b40b88bfb31408.tar.bz2
Fix spike interactive (-d) mode
Diffstat (limited to 'riscv/execute.cc')
-rw-r--r--riscv/execute.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/riscv/execute.cc b/riscv/execute.cc
index 3d5625f..0cb70e5 100644
--- a/riscv/execute.cc
+++ b/riscv/execute.cc
@@ -51,11 +51,9 @@ static reg_t execute_insn(processor_t* p, reg_t pc, insn_fetch_t fetch)
return npc;
}
-void processor_t::update_slow_path()
+bool processor_t::slow_path()
{
- slow_path = debug || state.single_step != state.STEP_NONE || state.dcsr.cause;
- if (slow_path)
- return;
+ return debug || state.single_step != state.STEP_NONE || state.dcsr.cause;
}
// fetch/decode/execute loop
@@ -97,7 +95,7 @@ void processor_t::step(size_t n)
{
take_interrupt();
- if (unlikely(slow_path))
+ if (unlikely(slow_path()))
{
while (instret < n)
{