Browse Source

refactor: Merge halt and halt_on_reset variables in processor_t

pull/1820/head
YenHaoChen 2 years ago
parent
commit
5c814c7134
  1. 4
      riscv/execute.cc
  2. 2
      riscv/processor.cc
  3. 1
      riscv/processor.h

4
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 (halt) {
halt = false;
} else if (halt_on_reset) {
halt_on_reset = false;
enter_debug_mode(DCSR_CAUSE_HALT, 0);
}
}

2
riscv/processor.cc

@ -186,8 +186,6 @@ void processor_t::reset()
{
xlen = isa.get_max_xlen();
state.reset(this, isa.get_max_isa());
halt = halt_on_reset;
halt_on_reset = false;
if (any_vector_extensions())
VU.reset();
in_wfi = false;

1
riscv/processor.h

@ -384,7 +384,6 @@ 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<bool> impl_table;

Loading…
Cancel
Save