risc-v Definition mret (RISC-V) Returns from machine-mode trap handling to the address stored in mepc. mret It restores execution to a lower privilege level after a machine-mode trap.