This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] ARM : prologue scan
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Jerome Guitton <guitton at act-europe dot fr>
- Cc: Richard dot Earnshaw at arm dot com, gdb-patches at sources dot redhat dot com
- Date: Tue, 09 Sep 2003 13:49:54 +0100
- Subject: Re: [RFA] ARM : prologue scan
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> Richard Earnshaw (rearnsha@arm.com):
>
> > > 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.
> >
> > 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).
>
> You are right. I got confused by these comments:
>
> The APCS (ARM Procedure Call Standard) defines the following
> prologue:
>
> mov ip, sp
> [stmfd sp!, {a1,a2,a3,a4}]
> stmfd sp!, {...,fp,ip,lr,pc}
> [stfe f7, [sp, #-12]!]
> [stfe f6, [sp, #-12]!]
> [stfe f5, [sp, #-12]!]
> [stfe f4, [sp, #-12]!]
> sub fp, ip, #nn @@ nn == 20 or 4 depending on second insn */
>
> I didn't see this definition in the ARM Thumb Procedure Call Standard...
> Is the ARM Procedure Call Standard a different document? If so, what is
> its status (Does the ATPCS make the APCS obsolete?) and where can I find
> it?
>
The APCS is obsolete (it predates Thumb), you might find some documents on
the web if you look hard enough, but I wouldn't bet on it these days.
Nevertheless, it's what ARM/Linux is currently based upon, so its usage is
not.
ARM/Linux substantially uses the minor variant APCS-R, but updated for use
on 32-bit mode.
R.