Re: Intel Assembler on OSX?
Re: Intel Assembler on OSX?
- Subject: Re: Intel Assembler on OSX?
- From: Jonas Maebe <email@hidden>
- Date: Fri, 3 Nov 2006 21:36:55 +0100
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.
Jonas
_______________________________________________
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