This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: [Beginner] disassembling gcc 3.4 and 4.1
- From: Brian Dessent <brian at dessent dot net>
- To: pierre <pierrelaurent62 at orange dot fr>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 08 Apr 2008 15:12:41 -0700
- Subject: Re: [Beginner] disassembling gcc 3.4 and 4.1
- References: <1207682447.3599.19.camel@localhost>
- Reply-to: gcc-help at gcc dot gnu dot org
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