This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: prologue length


On Fri, 16 Jan 2009 14:13:58 -0800, Ian Lance Taylor <iant@google.com>
wrote:
> "Vincent R." <forumer@smartmobili.com> writes:
> 
>> To locate appropriate handlers when an exception occurs in Win32
>> environments other than x86, 
> 
> Note that as far as I know, gcc only supports win32 for ARM and x86
> (and x86_64, I guess, or maybe that is win64).  So I assume you are
> talking about ARM.
> 
You are assuming well ;-)

> 
>> The portion of the code that is reversed is known as the prolog of the
>> function. It consists of instructions that modify the stack pointer and
>> set
>> up the stack frame immediately upon entry to the function. 
> 
> Normally when I say "prologue" I include the instructions that save
> registers to the stack.  Perhaps they are not included in this
> description.  It would probably be possible to restrict the compiler
> to always issue the stack setup instructions first for an SEH target.
> 
> Ian
No you are right, prologue definition in my context is :
Typically, a prolog segment contains separate sequences of instructions
that perform the following tasks:

    * Allocate a stack frame.
    * Save incoming argument registers.
    * Set up the frame pointer, if one is to be established. The prolog
copies the stack pointer to a designated register before the initial
register saves; then it uses this value to compute the value of the frame
pointer.
    * Save the link register with return address.
    * Allocate space for compiler-generated temporaries, local variables,
and an argument build area.
    * Indicate the end of the prolog code.




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