[Beginner] disassembling gcc 3.4 and 4.1
Brian Dessent
brian@dessent.net
Wed Apr 9 09:21:00 GMT 2008
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
More information about the Gcc-help
mailing list