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
00110000001000000000000001110011
31:0
 
Format R-Type (System)
Opcode 0x30200073
Extension Privileged

Operands