Hi,
In the ARM documentation about the LDM instruction and the ^suffix, we can read:
^ is an optional suffix, available in ARM state only. You must not use it in User mode or System mode. It has the following purposes: • If reglist contains the PC (R15), in addition to the normal multiple register transfer, the SPSR is copied into the CPSR. This is for returning from exception handlers. Use this only from exception modes. • Otherwise, data is transferred into or out of the User mode registers instead of the current mode registers.
It's quite confusing to me (especially "into or out of the User mode registers")
Are the following assertions OK (hypothesis : in supervisor mode when instruction is executed) ?
- LDMFD SP!, {R0-R12, LR, PC}^
SP is R13_svc?
LR is R14_svc? - LDMFD SP!, {R0-R12, LR}^
SP is R13_svc or R13_usr (R13) as PC is not in reglist?
LR is R14_usr (R14) as PC is not in reglist ?
Thanks you