diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2013-04-19 22:57:37 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2013-04-19 22:57:37 -0700 |
commit | 276c20be4c55119e8689a40e157a3a31d2be7673 (patch) | |
tree | 2cbc30c12aa7acf739fe98888092bdc60f49fa42 /pk/entry.S | |
parent | 0e1ecaf359beb5766c590bbb3f16a3bcb040a18d (diff) | |
download | riscv-pk-eos20.zip riscv-pk-eos20.tar.gz riscv-pk-eos20.tar.bz2 |
implement new register mappingeos20
Diffstat (limited to 'pk/entry.S')
-rw-r--r-- | pk/entry.S | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -76,13 +76,14 @@ save_tf: # write the trap frame onto the stack .globl pop_tf pop_tf: # write the trap frame onto the stack # restore gprs - LOAD t0,32*REGBYTES(a0) # restore sr (should disable interrupts) - mtpcr t0,ASM_CR(PCR_SR) + LOAD a1,32*REGBYTES(a0) + LOAD a2,1*REGBYTES(a0) + LOAD a3,2*REGBYTES(a0) + + mtpcr a1,ASM_CR(PCR_SR) # restore sr (disable interrupts) + mtpcr a2,ASM_CR(PCR_K0) + mtpcr a3,ASM_CR(PCR_K1) - LOAD x1,1*REGBYTES(a0) - mtpcr x1,ASM_CR(PCR_K0) - LOAD x1,2*REGBYTES(a0) - mtpcr x1,ASM_CR(PCR_K1) move x1,a0 LOAD x3,3*REGBYTES(x1) LOAD x4,4*REGBYTES(x1) |