From 58ddf573082690c4570304c7054e573595a18442 Mon Sep 17 00:00:00 2001 From: Zihao Yu Date: Mon, 9 Sep 2019 23:34:15 +0800 Subject: [PATCH] monitor,diff-test: let difftest_skip_[dut|ref]() return directly in detach mode --- src/monitor/diff-test/diff-test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/monitor/diff-test/diff-test.c b/src/monitor/diff-test/diff-test.c index 115fb135..53b46db4 100644 --- a/src/monitor/diff-test/diff-test.c +++ b/src/monitor/diff-test/diff-test.c @@ -15,6 +15,7 @@ static bool is_detach = false; // this is used to let ref skip instructions which // can not produce consistent behavior with NEMU void difftest_skip_ref() { + if (is_detach) return; is_skip_ref = true; } @@ -25,6 +26,7 @@ void difftest_skip_ref() { // Let REF run `nr_ref` instructions first. // We expect that DUT will catch up with REF within `nr_dut` instructions. void difftest_skip_dut(int nr_ref, int nr_dut) { + if (is_detach) return; skip_dut_nr_instr += nr_dut; while (nr_ref -- > 0) { -- GitLab