Put the current PC+4 into register 30, and jumps to the contents
of register src1. Also sets SPR(0) to 0, indicating non-privileged
mode execution.
Format
This is a JALR format instrucion.
31 - 26
25 - 21
20 - 0
101000
src1
00000 0000 0000 0000 0000
Functional Description
The rfi instruction changes the next
instruction PC value to the contents of GPR(src1). It also sets SPR(0) to 0,
indicating non-privileged mode execution.
NPC = GPR(src1);
SPR(0) = 0;
Side Effects
If this instruction is executed when the processor is not
in privileged mode, the Exception Cause Register is logically ORed with 0x10, the PC
of the instruction is placed in EPC, The Base Mask Register is also set to 0, and control transfers
to an operating system exception handler.