This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Simple ARM code generation
> To make things a bit easier when talking about stacks you can also talk
> about the stack layout in the instructions, you can then write your ldm
> and stm instructions using the stack mnemonics, the most common of which
> is a 'full-descending' stack (the stack grows by moving to a lower address
> and the bottom, addresed, word contains data -- it's full). So
>
> stmdb sp!, {r4, r5, r6}
> ldmdb sp!, {r4, r5, r6}
>
> will push r4-r6 onto the stack and then pop them off again.
Bah! I've just noticed a critical typo in the above. The stack variants
of the instructions are
stmFD sp!, {r4, r5, r6}
ldmFD sp!, {r4, r5, r6}
FD describes the stack here (F-ull D-escending).
Sorry about that, hope you weren't too confused.
R.