pa1.3: watchpoint support

This commit is contained in:
xinyangli 2024-02-08 20:07:03 +08:00
parent 2675a647b0
commit 504d270947
14 changed files with 363 additions and 36 deletions

View file

@ -31,6 +31,7 @@ static uint64_t g_timer = 0; // unit: us
static bool g_print_step = false;
void device_update();
bool wp_eval_all();
static void trace_and_difftest(Decode *_this, vaddr_t dnpc) {
#ifdef CONFIG_ITRACE_COND
@ -77,6 +78,10 @@ static void execute(uint64_t n) {
exec_once(&s, cpu.pc);
g_nr_guest_inst ++;
trace_and_difftest(&s, cpu.pc);
if (wp_eval_all()) {
puts(s.logbuf);
break;
}
if (nemu_state.state != NEMU_RUNNING) break;
IFDEF(CONFIG_DEVICE, device_update());
}