diff options
author | Chih-Min Chao <chihmin.chao@sifive.com> | 2020-10-06 09:07:09 -0700 |
---|---|---|
committer | Chih-Min Chao <chihmin.chao@sifive.com> | 2020-10-06 09:09:59 -0700 |
commit | f37ebaca770d91a90b83fe2be1ae61028ae69152 (patch) | |
tree | c5b920b70b17d84891b94aedf645ec34d0d0589c /riscv/execute.cc | |
parent | 77030fe8c29e108bd2828bf11337859509fd0ea6 (diff) | |
download | spike-f37ebaca770d91a90b83fe2be1ae61028ae69152.zip spike-f37ebaca770d91a90b83fe2be1ae61028ae69152.tar.gz spike-f37ebaca770d91a90b83fe2be1ae61028ae69152.tar.bz2 |
rvv: commitlog: get hartid directly
To avoid handling inconsistent csr status when running with reference design
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
Diffstat (limited to 'riscv/execute.cc')
-rw-r--r-- | riscv/execute.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/riscv/execute.cc b/riscv/execute.cc index 7313c51..9a91ce6 100644 --- a/riscv/execute.cc +++ b/riscv/execute.cc @@ -76,8 +76,7 @@ static void commit_log_print_insn(processor_t *p, reg_t pc, insn_t insn) int flen = p->get_state()->last_inst_flen; // print core id on all lines so it is easy to grep - uint64_t id = p->get_csr(CSR_MHARTID); - fprintf(log_file, "core%4" PRId64 ": ", id); + fprintf(log_file, "core%4" PRId64 ": ", p->get_id()); fprintf(log_file, "%1d ", priv); commit_log_print_value(log_file, xlen, pc); |