> ldm/stm are used just about everywhere for stack saving, block
copying etc.
>
> There are two forms of stm: stm(1) and stm(2)
> There are three forms of ldm: 1,2,3.
>
> The stm(1) form seems to be generally safe whereas the stm(2) form
is only
> safe in certain cases (saving the SYS/user register bank while not
in that
> mode). How you determine which you get, perhaps someone else knows.
..
I just found out:
The difference is achieved by using the "^" and specifying r15 (== pc
). This sets the "S" flag in the instruction encoding.
eg ldmia r13!,{r0,r1,pc}^
http://www.cl.cam.ac.uk/users/acjf3/papers/bdt.pdf gives some nice
backgroundMessage
Re: ARM_UCOS port and the use of stmfd/ldmfd
2005-09-21 by embeddedjanitor