aboutsummaryrefslogtreecommitdiff
path: root/riscv/execute.cc
diff options
context:
space:
mode:
Diffstat (limited to 'riscv/execute.cc')
-rw-r--r--riscv/execute.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/riscv/execute.cc b/riscv/execute.cc
index 9d1fb87..d7e586d 100644
--- a/riscv/execute.cc
+++ b/riscv/execute.cc
@@ -109,7 +109,8 @@ void processor_t::step(size_t n)
if (unlikely(invalid_pc(pc))) { \
switch (pc) { \
case PC_SERIALIZE_BEFORE: state.serialized = true; break; \
- case PC_SERIALIZE_AFTER: n = ++instret; break; \
+ case PC_SERIALIZE_AFTER: ++instret; break; \
+ case PC_SERIALIZE_WFI: n = ++instret; break; \
default: abort(); \
} \
pc = state.pc; \