From fb1f3f7ca99d2d1c0ee0b602a2b4b1ef218bf49a Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Tue, 12 Sep 2017 11:04:08 -0700 Subject: [PATCH] Don't take interrupts while in Debug Mode. --- riscv/processor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); } -- 2.30.2