diff options
author | Tim Newsome <tim@sifive.com> | 2017-09-12 13:53:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-12 13:53:17 -0700 |
commit | 8969a855132a27769dd6399566dc86ac32b26e76 (patch) | |
tree | 29c3e6e7fdfdffbbe50c72c2017249acc65054d9 | |
parent | 111dce1919d5d4d8bb99673f177add3504d8e9b7 (diff) | |
parent | fb1f3f7ca99d2d1c0ee0b602a2b4b1ef218bf49a (diff) | |
download | spike-8969a855132a27769dd6399566dc86ac32b26e76.zip spike-8969a855132a27769dd6399566dc86ac32b26e76.tar.gz spike-8969a855132a27769dd6399566dc86ac32b26e76.tar.bz2 |
Merge pull request #123 from riscv/debug_interrupts
Don't take interrupts while in Debug Mode.
-rw-r--r-- | riscv/processor.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv/processor.cc b/riscv/processor.cc index 00eccc8..b9fbe0e 100644 --- a/riscv/processor.cc +++ b/riscv/processor.cc @@ -174,7 +174,7 @@ void processor_t::take_interrupt(reg_t pending_interrupts) if (enabled_interrupts == 0) enabled_interrupts = pending_interrupts & state.mideleg & -s_enabled; - if (enabled_interrupts) + if (state.dcsr.cause == 0 && enabled_interrupts) throw trap_t(((reg_t)1 << (max_xlen-1)) | ctz(enabled_interrupts)); } |