Skip to content

Commit

Permalink
difftest: fix init of mstatus (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
weidingliu authored Oct 24, 2023
1 parent 71de241 commit b333b1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion difftest/difftest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ void DifftestRef::set_regs(diff_context_t *ctx, bool on_demand) {
if (!on_demand || state->pc != ctx->pc) {
state->pc = ctx->pc;
}
if (!on_demand || state->mstatus->read() != ctx->pc) {
if (!on_demand || state->mstatus->read() != ctx->mstatus) {
state->mstatus->write(ctx->mstatus);
}
if (!on_demand || state->mcause->read() != ctx->mcause) {
Expand Down

0 comments on commit b333b1d

Please sign in to comment.