Skip to content

Commit

Permalink
fix rvh macro for csrs (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
weidingliu authored Sep 22, 2023
1 parent a16b74d commit 2c960d3
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions src/isa/riscv64/difftest/dut.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,6 @@ bool isa_difftest_checkregs(CPU_state *ref_r, vaddr_t pc) {

#define check_reg(r) difftest_check_reg(str(r), pc, ref_r->r, cpu.r)

#ifdef CONFIG_RVV
check_reg(vtype );
check_reg(vstart );
check_reg(vxsat );
check_reg(vxrm );
check_reg(vl );
check_reg(vcsr );
check_reg(vlenb );
#endif // CONFIG_RVV

#ifdef CONFIG_RVH
check_reg(v);//virtualization mode
check_reg(mstatus );
check_reg(mcause );
check_reg(mepc );
Expand All @@ -74,6 +62,19 @@ bool isa_difftest_checkregs(CPU_state *ref_r, vaddr_t pc) {
check_reg(stval );
check_reg(mtvec );
check_reg(stvec );

#ifdef CONFIG_RVV
check_reg(vtype );
check_reg(vstart );
check_reg(vxsat );
check_reg(vxrm );
check_reg(vl );
check_reg(vcsr );
check_reg(vlenb );
#endif // CONFIG_RVV

#ifdef CONFIG_RVH
check_reg(v);//virtualization mode
check_reg(mtval2 );
check_reg(mtinst );
check_reg(hstatus );
Expand Down

0 comments on commit 2c960d3

Please sign in to comment.