This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: stack pointer instructions in subroutine
- From: Andrew Haley <aph-gcc at littlepinkcloud dot COM>
- To: Anitha Boyapati <anithab at sankhya dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 9 Aug 2007 17:13:51 +0100
- Subject: Re: stack pointer instructions in subroutine
- References: <Pine.LNX.4.44.0708091906110.736-100000@linux42.sankhya.com>
Anitha Boyapati writes:
> As far as I know, arguments are pushed onto the stack before entering
> a subroutine. Hence ebp makes sense. From here onwards, I feel lame.
> Summarizing :
>
> 1. Why should subl $8 and sub $12 from esp happen ?
>
> 2. After the call to constructor, why are 16 bytes being poped
> off? According to me, only 4 bytes ( for another round of ebp
> in constructor) should be popped off.
>
> I could be missing some basic details which are what I am after.
> Any help appreciated.
The stack is always 16-aligned. It's faster that way.
Andrew.