Re: [RFA] ARM : prologue scan

Richard Earnshaw
2003-09-05T10:14:19Z

>
> I have done some minor corrections on the previous patch, discard it.
> In attachment, the new version. No regression, no fixed.
>
> --
> Jerome.
>
> 2003-07-21 J. Guitton <guitton@gnat.com>
>
> * arm-tdep.c (arm_skip_prologue): Add the handling of "sub ip, sp #n"
> and "add ip, sp #n", as these instructions can be found in a ATPCS
> compliant prologue.
> (arm_scan_prologue): Ditto.

I don't think there are ever any circumstances when a SUB instruction
would be used. To do so would imply that on return we want to leave space
allocated on the stack. However, it doesn't really harm.

Secondly, and this applies only to the ChangeLog entry itself, this entry
sequence is nothing to do with the ATPCS (the A*T*PCS doesn't even
sanction the use of a frame pointer). Supporting nested functions is at
best a gcc extension (at worst it's a gcc hack). Anyway, it's not normal
to put the reason for a change in a CL entry, so just truncate the
sentence to read:

> 2003-07-21 J. Guitton <guitton@gnat.com>
>
> * arm-tdep.c (arm_skip_prologue): Handle "sub ip, sp #n" and
> "add ip, sp #n" in the prologue.
> (arm_scan_prologue): Ditto.

With that change, this is OK.

R.