mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-02 17:55:19 +00:00
Fixed cause_m_time_interrupt most significant byte
This commit is contained in:
parent
45f6cb055d
commit
205db4348c
@ -133,8 +133,8 @@ cause_m_time_interrupt:
|
|||||||
add t3, t2, t3 // add desired offset to the current time
|
add t3, t2, t3 // add desired offset to the current time
|
||||||
bgtu t3, t2, nowrap_m // check new time exceeds current time (no wraparound)
|
bgtu t3, t2, nowrap_m // check new time exceeds current time (no wraparound)
|
||||||
addi t6, t6, 1 // if wrap, increment most significant word
|
addi t6, t6, 1 // if wrap, increment most significant word
|
||||||
sw t6,4(t4) // store into most significant word of MTIMECMP
|
|
||||||
nowrap_m:
|
nowrap_m:
|
||||||
|
sw t6,4(t4) // store into most significant word of MTIMECMP
|
||||||
sw t3, 0(t4) // store into least significant word of MTIMECMP
|
sw t3, 0(t4) // store into least significant word of MTIMECMP
|
||||||
time_loop_m:
|
time_loop_m:
|
||||||
addi a3, a3, -1
|
addi a3, a3, -1
|
||||||
|
@ -136,8 +136,8 @@ cause_m_time_interrupt:
|
|||||||
add t3, t2, t3 // add desired offset to the current time
|
add t3, t2, t3 // add desired offset to the current time
|
||||||
bgtu t3, t2, nowrap_m // check new time exceeds current time (no wraparound)
|
bgtu t3, t2, nowrap_m // check new time exceeds current time (no wraparound)
|
||||||
addi t6, t6, 1 // if wrap, increment most significant word
|
addi t6, t6, 1 // if wrap, increment most significant word
|
||||||
sw t6,4(t4) // store into most significant word of MTIMECMP
|
|
||||||
nowrap_m:
|
nowrap_m:
|
||||||
|
sw t6,4(t4) // store into most significant word of MTIMECMP
|
||||||
sw t3, 0(t4) // store into least significant word of MTIMECMP
|
sw t3, 0(t4) // store into least significant word of MTIMECMP
|
||||||
time_loop_m:
|
time_loop_m:
|
||||||
addi a3, a3, -1
|
addi a3, a3, -1
|
||||||
|
Loading…
Reference in New Issue
Block a user