diff options
author | Chih-Min Chao <chihmin.chao@sifive.com> | 2020-02-10 21:56:03 -0800 |
---|---|---|
committer | Chih-Min Chao <chihmin.chao@sifive.com> | 2020-02-12 23:08:01 -0800 |
commit | a466f2b88aca929df477d4ea29705b7ec42d2e94 (patch) | |
tree | 5b07fb1375c5a32e179e616958dbfad72d7fd1dc /riscv/processor.h | |
parent | afe2fc595cdc9ec1b4f78c439a1160cee32157b6 (diff) | |
download | spike-a466f2b88aca929df477d4ea29705b7ec42d2e94.zip spike-a466f2b88aca929df477d4ea29705b7ec42d2e94.tar.gz spike-a466f2b88aca929df477d4ea29705b7ec42d2e94.tar.bz2 |
debug: refine per-inst difference record
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
Diffstat (limited to 'riscv/processor.h')
-rw-r--r-- | riscv/processor.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/riscv/processor.h b/riscv/processor.h index 1eea112..d73cf80 100644 --- a/riscv/processor.h +++ b/riscv/processor.h @@ -204,12 +204,7 @@ class vectorUnit_t { VRM get_vround_mode() { return (VRM)vxrm; } -}; -struct prev_reg_state_t { - regfile_t<reg_t, NXPR, false> XPR; - regfile_t<freg_t, NFPR, false> FPR; - vectorUnit_t VU; }; // architectural state of a RISC-V hart @@ -223,9 +218,6 @@ struct state_t regfile_t<reg_t, NXPR, true> XPR; regfile_t<freg_t, NFPR, false> FPR; - // Used when tracing - prev_reg_state_t *prev_state; - // control and status registers reg_t prv; // TODO: Can this be an enum instead? reg_t misa; @@ -540,6 +532,16 @@ public: }; vectorUnit_t VU; + + //extra record to the instruction writing + class prev_reg_state_t { + public: + regfile_t<reg_t, NXPR, false> XPR; + regfile_t<freg_t, NFPR, false> FPR; + processor_t::vectorUnit_t VU; + }; + + prev_reg_state_t *prev_state; }; reg_t illegal_instruction(processor_t* p, insn_t insn, reg_t pc); |