Skip to content

Commit

Permalink
Rollback partial wrong implemented code in pr #89
Browse files Browse the repository at this point in the history
  • Loading branch information
EagleTw committed Feb 19, 2023
1 parent f523c76 commit 8ef04c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ static uint32_t *csr_get_ptr(riscv_t *rv, uint32_t csr)
}
case CSR_TIMEH: { /* Upper 32 bits of time */
update_time(rv);
return (uint32_t *) (&rv->csr_time + 4);
return (uint32_t *) (&rv->csr_time) + 1;
}
case CSR_INSTRET: /* Number of Instructions Retired Counter */
/* Number of Instructions Retired Counter, just use cycle */
Expand Down

0 comments on commit 8ef04c0

Please sign in to comment.