r0 and r1 are used for passing the first two arguments to functions, and returning the results of functions. If a function does not use them for a return value, they can take any value after a function.
r1
Argument and result
No
r2
Argument
No
r2 and r3 are used for passing the second two arguments to functions. There values after a function is called can be anything.
r3
Argument
No
r4
General purpose
Yes
r4 to r12 are used for working values, and their value after a function is called must be the same as before.
r5
General purpose
Yes
r6
General purpose
Yes
r7
General purpose
Yes
r8
General purpose
Yes
r9
General purpose
Yes
r10
General purpose
Yes
r11
General purpose
Yes
r12
General purpose
Yes
lr
Return address
No
lr is the address to branch back to when a function is finished, but this does have to contain the same address after the function has finished.
sp
Stack pointer
Yes
sp is the stack pointer, described below. Its value must be the same after the function has finished.