aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/eret.h
blob: 46d5bed27ef40a8f8af61607c67933ff30b73c46 (plain)
1
2
3
4
5
require_supervisor;
if(sr & SR_ET)
  throw trap_illegal_instruction;
set_sr(((sr & SR_PS) ? sr : (sr & ~SR_S)) | SR_ET);
set_pc(epc);