Skip to content

Commit

Permalink
Fix context restore
Browse files Browse the repository at this point in the history
  • Loading branch information
a0u committed Apr 10, 2020
1 parent e0a2cf5 commit a88e50f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions misc/crt0.S
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ trap_entry:
csrs mstatus, t0

LREG x1, 1*REGBYTES(sp)
LREG x2, 2*REGBYTES(sp)
LREG x3, 3*REGBYTES(sp)
LREG x4, 4*REGBYTES(sp)
LREG x5, 5*REGBYTES(sp)
Expand Down Expand Up @@ -192,8 +191,9 @@ trap_entry:
LREG x29, 29*REGBYTES(sp)
LREG x30, 30*REGBYTES(sp)
LREG x31, 31*REGBYTES(sp)
/* Restore sp last */
LREG x2, 2*REGBYTES(sp)

addi sp, sp, (32*REGBYTES)
mret


Expand Down

0 comments on commit a88e50f

Please sign in to comment.