X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=riscv%2Fexecute.cc;h=7734ca2749d6756ca2270e6c359a3d28db712ec9;hb=84e1ac19ed5a69224aa8c3f920e3840fbc670771;hp=0ac0e0ac43c729cfa08f5c6a7b3dd079b1f2177e;hpb=773fab34d46e2ddaf4318b851ab23bd813f168ad;p=riscv-isa-sim.git diff --git a/riscv/execute.cc b/riscv/execute.cc index 0ac0e0a..7734ca2 100644 --- a/riscv/execute.cc +++ b/riscv/execute.cc @@ -79,7 +79,7 @@ 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: instret++; break; \ + case PC_SERIALIZE_AFTER: n = ++instret; break; \ default: abort(); \ } \ pc = state.pc; \ @@ -91,7 +91,7 @@ void processor_t::step(size_t n) try { - take_interrupt(); + take_pending_interrupt(); if (unlikely(slow_path())) {