This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: What happens on the stack when calling a function? (gcc-3.4.3)
- From: Arturas Moskvinas <arturas dot moskvinas at gmail dot com>
- To: Daniel Hepper <Daniel dot Hepper at gmx dot net>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 16 May 2005 16:23:24 +0300
- Subject: Re: What happens on the stack when calling a function? (gcc-3.4.3)
- References: <42889A34.40003@gmx.net>
- Reply-to: Arturas Moskvinas <arturas dot moskvinas at gmail dot com>
> Hi folks!
>
> I stumbled across some strange stuff on the stack when calling a
> function with gcc-3.4.3.
There was similar discusion maybe month ago.
GCC just tries to align everything to 16 bytes boundary(this
optimization is very "cheap" by the way), but if you need exact
behavior then you should use -mpreferred-stack-boundary, more info
you'll find:
http://gcc.gnu.org/onlinedocs/gcc-3.4.3/gcc/i386-and-x86_002d64-Options.html
(-mpreferred-stack-boundary)
Arturas Moskvinas