Browse Source

Fix eret (again)

* Set SR_S if SR_PS is set, not the other way around
  (that is, set SR_S if SR_PS is not set).
confprec
Quan Nguyen 13 years ago
parent
commit
a39658bf83
  1. 2
      riscv/insns/eret.h

2
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);

Loading…
Cancel
Save