projects
/
riscv-isa-sim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d148b8a
)
Fix dumb ERET bug
author
Andrew Waterman
<waterman@cs.berkeley.edu>
Wed, 31 Jul 2013 20:37:33 +0000
(13:37 -0700)
committer
Andrew Waterman
<waterman@cs.berkeley.edu>
Wed, 31 Jul 2013 20:37:33 +0000
(13:37 -0700)
riscv/insns/eret.h
patch
|
blob
|
history
diff --git
a/riscv/insns/eret.h
b/riscv/insns/eret.h
index 96d951c4e7cc7cc804a8a6aa138f0d5c58a03e9d..deed103c95f7dc028d3be0ddea94dc8a7c22a3da 100644
(file)
--- a/
riscv/insns/eret.h
+++ b/
riscv/insns/eret.h
@@
-1,5
+1,5
@@
require_supervisor;
-set_pcr(PCR_SR, ((sr & ~(SR_
P
S | 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);