The purpose of R14 in ARM chip. The R13 register usually is used to save a stack point.
The R14 register is used to save a copy of content of R15 which is PC register.
Before calling a subroutine R14 save the return address of a subroutine, the content of R15
is saved to R14 -- LR.
MOV PC, LR
BX LR
Now, the content of R14 saved is just the return address of a routine. When returning from
a subroutine, restore the address from R14 into R15.
The ARM chip has 37 registers. R0 ~ R7, there 8 registers, they are used to common registers.
From R8 to R12, there are twenty register. Why? When being at 'fiq' mode, from R8 to R12, every
register must use R8_fiq ... register. As matter of a fact, each register has two register,
Rx or Rx_fiq.
The R13 and R14 is also similar to R8. However, each of them has more brother registers. At
'usr' and 'sys' mode, R13 and R14 is still R13, R14. Except for those two modes, there are R13_<mode>,
R14_<mode>, <mode> includes 'usr', 'fiq', 'irq', 'svc', 'abt' or 'und' modes.
At every mode, ARM chip has respectively R13 as SP register. So, R13 usually is initialized
to save the address of a stack for an application.
The SPSR also has own five mode registers. They are SPSR_fiq, SPSR_abt, SPSR_abt, SPSR_irq,
SPSR_und. The SPSR abbreviate for "Saved Program Status Register". It is used to save a copy of
the content of CPSR -- Current Program Status Register.