Closed FedericoBruzzone closed 2 years ago
Branch with Link (BL) writes the old PC into the link register (R14) of the current bank. The PC value written into R14 is adjusted to allow for the prefetch, and contains the address of the instruction following the branch and link instruction. Note that the CPSR is not saved with the PC and R14[1:0] are always cleared.
To return from a routine called by Branch with Link use MOV PC,R14
if the link register is still valid or LDM Rn!,{..PC}
if the link register has been saved onto a stack pointed to by Rn.
So, do we want to open an issue about this?
Closes #46
It is a first implementation. This implementation looks like that of
branch
, but if the bit 24 is set to 1 we need save the PC in cell 14 of theregisters
.Signed-off-by: Federico Bruzzone federico.bruzzone.i@gmail.com