Re: Intel Assembler on OSX?
Re: Intel Assembler on OSX?
- Subject: Re: Intel Assembler on OSX?
- From: Eric Albert <email@hidden>
- Date: Sat, 4 Nov 2006 11:09:27 -0800
On Nov 4, 2006, at 2:01 AM, Uli Kusterer wrote:
So, my app will be launched with a mis-aligned stack? Aha! That
also explains the (seemingly pointless) subl $8, %esp at the start
of even empty functions.
That's not actually necessary, though I can't remember if the
compiler might do it anyway. Since the ABI requirement is just that
the stack be 16-byte aligned at the site of every call instruction,
leaf functions don't need to maintain internal stack alignment unless
it would be useful for their codegen. A leaf function which doesn't
have any SSE/SSE2/SSE3/SSSE3 instructions doesn't need a 16-byte
aligned stack.
So, whenever I enter a function, the stack will be at 4 because the
return address has been pushed?
It'll actually be at 0xc -- 4 down from 16.
-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