From 5a71346149597edd975af2c9b07d1edf9636e2f9 Mon Sep 17 00:00:00 2001 From: wangkaifan Date: Tue, 9 Feb 2021 14:13:44 +0800 Subject: [PATCH] difftest: clean up unused code in difftest.cpp --- src/test/csrc/difftest.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/test/csrc/difftest.cpp b/src/test/csrc/difftest.cpp index b409f1885..effb1e8b0 100644 --- a/src/test/csrc/difftest.cpp +++ b/src/test/csrc/difftest.cpp @@ -143,23 +143,10 @@ void difftest_display(uint8_t mode, int coreid) { int difftest_step(DiffState *s, int coreid) { uint64_t ref_r[DIFFTEST_NR_REG]; - uint64_t this_pc = s->reg_scala[DIFFTEST_THIS_PC]; + // ref_difftest_getregs() will get the next pc, // therefore we must keep track this one - - // if (skip) { - // // printf("diff pc: %x isRVC %x\n", this_pc, isRVC); - // // MMIO accessing should not be a branch or jump, just +2/+4 to get the next pc - // reg_scala[DIFFTEST_THIS_PC] += isRVC ? 2 : 4; - // nemu_this_pc += isRVC ? 2 : 4; - // // to skip the checking of an instruction, just copy the reg state to reference design - // ref_difftest_setregs(reg_scala); - // pc_retire_pointer = (pc_retire_pointer+1) % DEBUG_RETIRE_TRACE_SIZE; - // pc_retire_queue[pc_retire_pointer] = this_pc; - // inst_retire_queue[pc_retire_pointer] = this_inst; - // retire_cnt_queue[pc_retire_pointer] = commit; - // return 0; - // } + uint64_t this_pc = s->reg_scala[DIFFTEST_THIS_PC]; // sync lr/sc reg status if (s->scFailed) { @@ -172,7 +159,6 @@ int difftest_step(DiffState *s, int coreid) { // single step difftest if (s->intrNO) { ref_difftest_raise_intr(s->intrNO, coreid); - // ref_difftest_exec(1);//TODO } else { assert(s->commit > 0 && s->commit <= DIFFTEST_WIDTH); for (int i = 0; i < s->commit; i++) { -- GitLab