diff --git a/riscv/csrs.cc b/riscv/csrs.cc index 7ea1e4fa..f2511e7c 100644 --- a/riscv/csrs.cc +++ b/riscv/csrs.cc @@ -1345,7 +1345,6 @@ dcsr_csr_t::dcsr_csr_t(processor_t* const proc, const reg_t addr): ebreaku(false), ebreakvs(false), ebreakvu(false), - halt(false), v(false), cause(0), ext_cause(0), diff --git a/riscv/csrs.h b/riscv/csrs.h index 4055d862..278bdb37 100644 --- a/riscv/csrs.h +++ b/riscv/csrs.h @@ -696,7 +696,6 @@ class dcsr_csr_t: public csr_t { bool ebreaku; bool ebreakvs; bool ebreakvu; - bool halt; bool v; uint8_t cause; uint8_t ext_cause; diff --git a/riscv/execute.cc b/riscv/execute.cc index 5b8e5238..c117230d 100644 --- a/riscv/execute.cc +++ b/riscv/execute.cc @@ -216,8 +216,8 @@ void processor_t::step(size_t n) enter_debug_mode(DCSR_CAUSE_DEBUGINT, 0); } else if (halt_request == HR_GROUP) { enter_debug_mode(DCSR_CAUSE_GROUP, 0); - } else if (state.dcsr->halt) { - state.dcsr->halt = false; + } else if (halt) { + halt = false; enter_debug_mode(DCSR_CAUSE_HALT, 0); } } diff --git a/riscv/processor.cc b/riscv/processor.cc index c4d8c069..3b916129 100644 --- a/riscv/processor.cc +++ b/riscv/processor.cc @@ -186,7 +186,7 @@ void processor_t::reset() { xlen = isa.get_max_xlen(); state.reset(this, isa.get_max_isa()); - state.dcsr->halt = halt_on_reset; + halt = halt_on_reset; halt_on_reset = false; if (any_vector_extensions()) VU.reset(); diff --git a/riscv/processor.h b/riscv/processor.h index 4f22cbde..2a9d4f4e 100644 --- a/riscv/processor.h +++ b/riscv/processor.h @@ -384,6 +384,7 @@ private: FILE *log_file; std::ostream sout_; // needed for socket command interface -s, also used for -d and -l, but not for --log bool halt_on_reset; + bool halt; bool in_wfi; bool check_triggers_icount; std::vector impl_table;