This is the mail archive of the gcc-help@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: [Beginner] disassembling gcc 3.4 and 4.1


pierre wrote:

> Why is there a difference between 3.4.6 and 4.1.2 gcc version ?
> Despite my efforts understanding this, i would appreciate any links
> regarding any document related to this.

The later version seems to be keeping the stack aligned to a larger
alignment.  Some instructions require this (e.g. SSE) and keeping the
stack always aligned to 16 makes supporting these instructions a lot
easier.

But you should treat the size of the frame that the compiler chooses as
an implementation detail; it will vary with a number of factors.  But
the size of the frame usually doesn't affect pointer calculations, i.e.
the first local variable is %ebp-4 regardless of whether the allocated
frame is 16 or 1600 bytes.

Brian


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