diff options
author | Scott Johnson <scott.johnson@arilinc.com> | 2023-02-27 14:33:39 -0800 |
---|---|---|
committer | Scott Johnson <scott.johnson@arilinc.com> | 2023-04-04 09:21:39 -0700 |
commit | 710117a9970a485513938abf6b2d90f1b0b0fc49 (patch) | |
tree | fb902090a80358dc61c3376f1e24005f0dc2ec71 | |
parent | 805d71705c28cd0404bba38032e4c7264b744bc7 (diff) | |
download | spike-710117a9970a485513938abf6b2d90f1b0b0fc49.zip spike-710117a9970a485513938abf6b2d90f1b0b0fc49.tar.gz spike-710117a9970a485513938abf6b2d90f1b0b0fc49.tar.bz2 |
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.
-rw-r--r-- | riscv/processor.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/riscv/processor.cc b/riscv/processor.cc index 153ff9d..c757d42 100644 --- a/riscv/processor.cc +++ b/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)); } } |