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:
7a05cbd
)
Fix eret (again)
author
Quan Nguyen
<quannguyen@berkeley.edu>
Thu, 1 Aug 2013 04:33:25 +0000
(21:33 -0700)
committer
Quan Nguyen
<quannguyen@berkeley.edu>
Thu, 1 Aug 2013 04:37:44 +0000
(21:37 -0700)
* Set SR_S if SR_PS is set, not the other way around
(that is, set SR_S if SR_PS is not set).
riscv/insns/eret.h
patch
|
blob
|
history
diff --git
a/riscv/insns/eret.h
b/riscv/insns/eret.h
index deed103c95f7dc028d3be0ddea94dc8a7c22a3da..9ea8bafa4fa1e27b9bf87c3b29eed5a4abce131d 100644
(file)
--- a/
riscv/insns/eret.h
+++ b/
riscv/insns/eret.h
@@
-1,5
+1,5
@@
require_supervisor;
set_pcr(PCR_SR, ((sr & ~(SR_S | SR_EI)) |
- ((sr & SR_PS) ?
0 : SR_S
)) |
+ ((sr & SR_PS) ?
SR_S : 0
)) |
((sr & SR_PEI) ? SR_EI : 0));
set_pc(epc);