Fix dumb ERET bug
authorAndrew Waterman <waterman@cs.berkeley.edu>
Wed, 31 Jul 2013 20:37:33 +0000 (13:37 -0700)
committerAndrew Waterman <waterman@cs.berkeley.edu>
Wed, 31 Jul 2013 20:37:33 +0000 (13:37 -0700)
riscv/insns/eret.h

index 96d951c4e7cc7cc804a8a6aa138f0d5c58a03e9d..deed103c95f7dc028d3be0ddea94dc8a7c22a3da 100644 (file)
@@ -1,5 +1,5 @@
 require_supervisor;
-set_pcr(PCR_SR, ((sr & ~(SR_PS | SR_EI)) |
+set_pcr(PCR_SR, ((sr & ~(SR_S | SR_EI)) |
                 ((sr & SR_PS) ? 0 : SR_S)) |
                 ((sr & SR_PEI) ? SR_EI : 0));
 set_pc(epc);