Skip to content

Commit

Permalink
risc-v/esp32c3: Reorder register restoration on interrupt handler epi…
Browse files Browse the repository at this point in the history
…loque
  • Loading branch information
gustavonihei authored and xiaoxiang781216 committed Apr 28, 2021
1 parent 66a15a6 commit 27d32f4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions arch/risc-v/src/esp32c3/esp32c3_interrupt.S
Original file line number Diff line number Diff line change
@@ -130,7 +130,7 @@ _interrupt_handler:
lw s0, 32*4(sp) /* restore mstatus */
csrw mstatus, s0


lw x1, 1*4(sp) /* ra */
lw x4, 4*4(sp) /* tp */
lw x5, 5*4(sp) /* t0 */
lw x6, 6*4(sp) /* t1 */
@@ -160,8 +160,6 @@ _interrupt_handler:
lw x30, 30*4(sp) /* t5 */
lw x31, 31*4(sp) /* t6 */

lw x1, 1*4(sp) /* ra */

lw sp, 2*4(sp) /* restore original sp */

/* Return from Machine Interrupt */

0 comments on commit 27d32f4

Please sign in to comment.