[M3devel] strange code?

Tony Hosking hosking at cs.purdue.edu
Sat Jan 19 09:12:12 CET 2008


Yes, indeed.   I believe gcc will try to keep the stack 16-byte aligned.

I seem to recall that there are alignment configuration values in the  
compiler that might cause a crash if set wrong.

On Jan 19, 2008, at 12:46 AM, Jay wrote:

> I'm comparing the output of the two backends, since I haven't  
> figured out many gdb commands yet.
> Well darn the code looks semantically the same around the crash so  
> I'll have to dig differently.
>
> Still, why does it bump the stack extra like this:
>
>  subl $8, %esp    <==
>  pushl %eax
>  pushl %edx
>  call _RTLinker__TraceModule
>  addl $16, %esp    <== the other backend uses 8 here
>
>
>  subl $12, %esp <==
>  pushl $0
>  call *%eax
>  addl $16, %esp <== the other uses 4
>
> Is it trying to keep the stack 16-aligned?
>
>  - Jay
>
>
> Need to know the score, the latest news, or you need your Hotmail®- 
> get your "fix" Check it out.




More information about the M3devel mailing list