MRET
Machine Return
MRET
Returns from a machine-mode trap handler.
Details
MRET returns from a machine-level trap. It restores the PC from mepc, restores privilege from the MPP field of mstatus, and updates interrupt-enable and privilege fields in mstatus.
Pseudocode Operation
PC = MEPC; Priv = MPP; MIE = MPIE;
Example
MRET
Encoding
Binary Layout
0011000
31:25
00010
24:20
00000
19:15
000
14:12
00000
11:7
1110011
6:0