SRET

Supervisor Return

SRET

Returns from a supervisor-mode trap handler.

Details

SRET returns from a supervisor-level trap. It restores the PC from sepc, restores privilege from the SPP field of sstatus, and updates interrupt-enable fields.

Pseudocode Operation

PC = SEPC; Priv = SPP; SIE = SPIE;

Example

SRET

Encoding

Binary Layout
00010000001000000000000001110011
31:0
 
Format R-Type (System)
Opcode 0x10200073
Extension Privileged

Operands