Browse Source

Decrement icount trigger count on external interrupt

Spec says:

> This trigger matches on every instruction completed or trap
> taken from a privilege mode where the trigger is enabled.

Other (synchronous) traps were already correctly decrementing count,
but external interrupts (i.e. timer interrupts) were not.
pull/1263/head
Scott Johnson 3 years ago
parent
commit
710117a997
No known key found for this signature in database GPG Key ID: 61C1F01D3D1410C9
  1. 1
      riscv/processor.cc

1
riscv/processor.cc

@ -696,6 +696,7 @@ void processor_t::take_interrupt(reg_t pending_interrupts)
else
abort();
if (check_triggers_icount) TM.detect_icount_match();
throw trap_t(((reg_t)1 << (isa->get_max_xlen() - 1)) | ctz(enabled_interrupts));
}
}

Loading…
Cancel
Save