Skip to content

Commit

Permalink
rv64,isa: change CSR orders to align with difftest
Browse files Browse the repository at this point in the history
  • Loading branch information
poemonsense committed Sep 8, 2023
1 parent 3f9a7e1 commit 452757f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ready-to-run
18 changes: 12 additions & 6 deletions src/isa/riscv64/include/isa-def.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,26 @@ typedef struct {
#endif // CONFIG_FPU_NONE

// shadow CSRs for difftest
uint64_t pc;
uint64_t mstatus, mcause, mepc;
uint64_t sstatus, scause, sepc;

uint64_t satp, mip, mie, mscratch, sscratch, mideleg, medeleg;
uint64_t mtval, stval, mtvec, stvec;
uint64_t mode;
uint64_t mstatus, sstatus;
uint64_t mepc, sepc;
uint64_t mtval, stval;
uint64_t mtvec, stvec;
uint64_t mcause, scause;
uint64_t satp;
uint64_t mip, mie;
uint64_t mscratch, sscratch;
uint64_t mideleg, medeleg;
uint64_t pc;
// Above will be synced by regcpy when run difftest, DO NOT TOUCH

#ifdef CONFIG_RVH
uint64_t v; // virtualization mode
uint64_t mtval2, mtinst, hstatus, hideleg, hedeleg;
uint64_t hcounteren, htval, htinst, hgatp, vsstatus;
uint64_t vstvec, vsepc, vscause, vstval, vsatp, vsscratch;
#endif

#ifdef CONFIG_RVV
//vector
union {
Expand Down

0 comments on commit 452757f

Please sign in to comment.