site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Nov 4, 2006, at 2:01 AM, Uli Kusterer wrote: *mumbles something incomprehensible about upside-down stacks* ;-) Cheers, -- M. Uli Kusterer http://www.zathras.de _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... Am 04.11.2006 um 20:09 schrieb Eric Albert: 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. Good to know. Though I guess it's easier to write a codegen that keeps the stack aligned than one that keeps track of alignment and fixes it as needed... 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. This email sent to site_archiver@lists.apple.com
participants (1)
-
Uli Kusterer