mnret

MNRET is an M-mode-only instruction that uses the values in mnepc and mnstatus to return to the program counter, privilege mode, and virtualization mode of the interrupted context. This instruction also sets mnstatus.NMIE. If MNRET changes the privilege mode to a mode less privileged than M, it also sets mstatus.MPRV to 0. If the Zicfilp extension is implemented, then if the new privileged mode is y, MNRET sets ELP to the logical AND of yLPE (see Section 22.1.1) and mnstatus.MNPELP.

Synopsis

mnret

Encoding

Type:

03101110000001000000000000001110011
funct7: 0111000
funct3: 000
opcode: 1110011

RISC-V Instruction Encoder/Decoder

open mnret in rvcodecjs

Availability