Fixed cause_m_time_interrupt most significant byte

This commit is contained in:
David Harris 2024-11-16 18:31:02 -08:00
parent 45f6cb055d
commit 205db4348c
2 changed files with 2 additions and 2 deletions

View File

@ -133,8 +133,8 @@ cause_m_time_interrupt:
add t3, t2, t3 // add desired offset to the current time
bgtu t3, t2, nowrap_m // check new time exceeds current time (no wraparound)
addi t6, t6, 1 // if wrap, increment most significant word
sw t6,4(t4) // store into most significant word of MTIMECMP
nowrap_m:
sw t6,4(t4) // store into most significant word of MTIMECMP
sw t3, 0(t4) // store into least significant word of MTIMECMP
time_loop_m:
addi a3, a3, -1

View File

@ -136,8 +136,8 @@ cause_m_time_interrupt:
add t3, t2, t3 // add desired offset to the current time
bgtu t3, t2, nowrap_m // check new time exceeds current time (no wraparound)
addi t6, t6, 1 // if wrap, increment most significant word
sw t6,4(t4) // store into most significant word of MTIMECMP
nowrap_m:
sw t6,4(t4) // store into most significant word of MTIMECMP
sw t3, 0(t4) // store into least significant word of MTIMECMP
time_loop_m:
addi a3, a3, -1