MRET
Machine Return
MRET
Returns from a machine-mode trap handler.
Encoding
Binary Layout
00110000001000000000000001110011
31:0
Operands
Related
More in Privileged
Reference
View in RISC-V Unprivileged ISA Specification ↗
RISC-V ISA Manual
Description
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.
Operation
PC = MEPC; Priv = MPP; MIE = MPIE;