diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2016-02-05 18:09:36 -0800 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2016-02-19 13:01:11 -0800 |
commit | 1d78c4a12e30ca6d51d6863e96661f80534cac74 (patch) | |
tree | 7762e340b02a001a407ff8856afa295880753350 /pk/entry.S | |
parent | ba74319214175c0fffe84c79af685d8278831116 (diff) | |
download | pk-1d78c4a12e30ca6d51d6863e96661f80534cac74.zip pk-1d78c4a12e30ca6d51d6863e96661f80534cac74.tar.gz pk-1d78c4a12e30ca6d51d6863e96661f80534cac74.tar.bz2 |
Simplify status register reloading in pk
Diffstat (limited to 'pk/entry.S')
-rw-r--r-- | pk/entry.S | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -74,14 +74,10 @@ trap_entry: .globl start_user start_user: - csrc sstatus, SSTATUS_IE - li t0, SSTATUS_PS - LOAD t1, 32*REGBYTES(a0) - LOAD t2, 33*REGBYTES(a0) - csrc sstatus, t0 - and t0, t0, t1 - csrs sstatus, t0 - csrw sepc, t2 + LOAD t0, 32*REGBYTES(a0) + LOAD t1, 33*REGBYTES(a0) + csrw sstatus, t0 + csrw sepc, t1 # restore x registers LOAD x1,1*REGBYTES(a0) |