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: GCC substracting strange amount of bytes from esp


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


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