From: Tim Newsome Date: Tue, 12 Sep 2017 18:04:08 +0000 (-0700) Subject: Don't take interrupts while in Debug Mode. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fb1f3f7ca99d2d1c0ee0b602a2b4b1ef218bf49a;p=riscv-isa-sim.git Don't take interrupts while in Debug Mode. --- 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)); }