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
0001000
31:25
00010
24:20
00000
19:15
000
14:12
00000
11:7
1110011
6:0
 
Format R-Type (System)
Opcode 0x73
Extension Privileged

Operands