Re: Is GCC V3.4.6 supposed to be SystemV i386 ABI v4 compliant?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Daney wrote:
> Curtis Taylor wrote:
> > I have a case of g++ generating this instruction:
> > 	add	$0xe,%esp
> > and creating a non 32bit aligned %esp.  This is enabling a SIGSEGV in a
> > signal handler that expects the stack to be word aligned.  
> > 
> > How can I find out if GCC V3.4.6 is intended to keep the stack word
> > aligned at all times as required according to System V i386 ABI v4?
> > 
> 
> Does the ABI really require that the stack be aligned in places other 
> than at function entry?

The phrase below "At all times" has lead me to believe it's intended to
clarify that %esp should always be word aligned. 

>From page 3-10 of the March 19,1997 Delta 44.6 version 4:

        The stack is word aligned.  Although the architecture does not
        require any alignment of the stack, software convention and the
        operating system requires that the stack be aligned on a word
        boundary. 
        
>From page 3-11:
        
        Some registers have assigned roles in the standard calling
        sequence:
        %esp	The stack pointer holds the limit of the current stack
        	frame, which is the address of the stack's bottom-most,
        	valid word.  At all times, the stack pointer should point
        	to a word-aligned area. 

=- Curtis Taylor


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux