Re: Intel Assembler on OSX?
Re: Intel Assembler on OSX?
- Subject: Re: Intel Assembler on OSX?
- From: Eric Albert <email@hidden>
- Date: Fri, 3 Nov 2006 13:21:18 -0800
On Nov 3, 2006, at 12:36 PM, Jonas Maebe wrote:
On 03 Nov 2006, at 21:19, Uli Kusterer wrote:
_main:
pushl ëp
movl %esp, ëp
subl $40, %esp ### HERE
movl $7, 4(%esp)
movl $5, (%esp)
call _addNumbers
movl êx, -12(ëp)
movl -12(ëp), êx
leave
ret
.subsections_via_symbols
I would have expected that to be maybe 8 bytes for the parameters,
and since the stack according to all docs I could find is 4-byte
aligned,
You found the wrong docs, it's 16 byte aligned. See
http://developer.apple.com/documentation/DeveloperTools/
Conceptual/LowLevelABI/Articles/IA32.html
It also contains all information regarding how parameters are
passed and how function results are returned.
that would be 8. Instead it's 40.
Without the corresponding C code, it's hard to say why exactly the
compiler is doing that.
It looks like this code isn't built with optimization, so I'm not
surprised that the compiler used a bit more stack space than necessary.
-Eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden