How do I access the user R13 and R14 which are saved when supervisor mode is entered? I am using an ARM7TDMI.
I.E. I do not want to access supervisor R14 which now
I've discovered a better way: -
When doing a STM, if r15 isn't one of the operands then ^ gives access to user-mode registers. However, autoincrementing doesn't seem to work within the instruction, and a nop is required afterwards if you want to access the register bank.
Something like
stmfd r13, {r13-r14}^ ;store r13 and r14 usermode
nop
sub r13, r13, #8 ;update stack pointer