RTL

Jim Wilson wilson@specifixinc.com
Thu Sep 25 05:02:00 GMT 2003


Sruthy C.N wrote:
>        In the RTL file (gcc version 3.2.2) there is some instructions(insn
> 6,8,10,12) which do some manipulations on esp..what is it doing?

As I mentioned in a previous message, it is aligning the stack in main 
to a 16 byte boundary.  I believe this is for the MMX/SSE/SSE2 
instructions, which are faster if the stack is 16 byte aligned.  Some 
systems don't align the stack to 16 bytes at program startup, so we do 
it in main.  This extra instruction only occurs in the main function.

>         If we consider the assembly program corresponding to this there is
> no such instructions corresponding to this..why? 

Please give a testcase.  I suspect you got your examples mixed up.  Or 
maybe it got optimized away, though that seems unlikely.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



More information about the Gcc mailing list