RET

Synopsis:

Return from subroutine.

Operation:

pc = r31

r30 = r30 + Immediate

Description:

This instruction returns from a subroutine by loading the program counter with the contents of the link register (LR/R31). Additionally the stack pointer (register 30) is incremented by the amount specified in the immediate field of the instruction. The immediate value must be a multiple of eight in order to keep the stack word aligned.

This instruction will never cause an exception.

Format:

Opcode7 Ra5 Rt5 Immediate15
27 ---- ---- Immediate12 000