RTEMS CPU Architecture Supplement
The ARM architecture supports a simple yet
effective call and return mechanism. A subroutine is invoked
via the branch and link (bl
) instruction. This instruction
saves the return address in the lr
register. Returning
from a subroutine only requires that the return address be
moved into the program counter (pc
), possibly with
an offset. It is is important to
note that the bl
instruction does not
automatically save or restore any registers. It is the
responsibility of the high-level language compiler to define the
register preservation and usage convention.
RTEMS CPU Architecture Supplement
Copyright © 1988-2007OAR Corporation