[arm] Stack alignment in crt?.asm
Richard Earnshaw
Richard.Earnshaw@arm.com
Tue May 4 11:33:00 GMT 2004
On Tue, 2004-05-04 at 01:30, Paul Brook wrote:
> The following patch makes crti.asm and crtn.asm push/pop an extra register.
> This ensures that proper stack alignment is preserved.
>
> Tested with cross to arm-none-elf.
> Ok?
>
> Paul
>
> 2004-05-04 Paul Brook <paul@codesourcery.com>
>
> * config/arm/crti.asm: Push an even number of registers.
> * config/arm/crtn.asm: And restore them.
>
Ok, except for this one:
> - ldmdb fp, {r4, r5, r6, r7, r8, r9, sl, fp, sp, lr}
> + ldmdb fp, {r3, r4, r5, r6, r7, r8, r9, sl, fp, sp, lr}
Which also needs to be fixed to do the frame pointer dance (must load
via SP if restoring SP).
R.
More information about the Gcc-patches
mailing list