This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] ARM : prologue scan


> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]