提交 59205afb 编写于 作者: W William Wang

Difftest: add xtval to snapshot

上级 5c7287f0
......@@ -33,6 +33,7 @@ typedef struct {
uint64_t satp, mip, mie, mscratch, sscratch, mideleg, medeleg;
uint64_t mtval, stval;
uint64_t mode;
bool amo;
......
#ifndef __RISCV64_DIFF_TEST_H__
#define __RISCV64_DIFF_TEST_H__
#define DIFFTEST_REG_SIZE (sizeof(uint64_t) * (32 + 32 + 1 + 6 + 7 + 1))
#define DIFFTEST_REG_SIZE (sizeof(uint64_t) * (32 + 32 + 1 + 6 + 9 + 1))
// GRPs + FPRs + pc + [m|s][status|cause|epc] + other necessary CSRs + mode
void isa_difftest_getregs_hook(void);
......
......@@ -22,6 +22,8 @@ static void csr_prepare() {
cpu.sscratch = sscratch->val;
cpu.mideleg = mideleg->val;
cpu.medeleg = medeleg->val;
cpu.mtval = mtval->val;
cpu.stval = stval->val;
}
static void csr_writeback() {
......@@ -40,6 +42,8 @@ static void csr_writeback() {
sscratch->val = cpu.sscratch;
mideleg->val = cpu.mideleg;
medeleg->val = cpu.medeleg;
mtval->val = cpu.mtval;
stval->val = cpu.stval;
}
void isa_difftest_getregs(void *r) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册