This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: GCC substracting strange amount of bytes from esp
- From: Ian Lance Taylor <iant at google dot com>
- To: Bastian Ballmann <balle at chaostal dot de>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 28 Jan 2011 15:54:19 -0800
- Subject: Re: GCC substracting strange amount of bytes from esp
- References: <20110128170848.3ad4ee2e@chaostal.de>
Bastian Ballmann <balle@chaostal.de> writes:
> If I disassemble the test function I see that gcc 4.5.2 produced the
> following assembly:
>
> 0x08048374 <+0>: push %ebp
> 0x08048375 <+1>: mov %esp,%ebp
> 0x08048377 <+3>: sub $0x20,%esp
> 0x0804837a <+6>: leave
> 0x0804837b <+7>: ret
>
> I would expect that 0x1c or 0x18 byte will be substracted from esp, but
> it's 0x20.
See the -mpreferred-stack-boundary option.
Ian