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: stack pointer instructions in subroutine


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.


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