site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com
<http://developer.apple.com/documentation/DeveloperTools/Conceptual/ LowLevelABI/Articles/IA32.html>
has a diagram in "Passing Structures and Vectors" that shows that small structs get passed on the stack backwards. I.e., I have a structure
struct PseudoPoint { float x; float y; };
and it gets passed as a parameter on the stack as:
y x
Wouldn't it be easier to leave everything in its proper order?
Um, it is in its proper order. The stack grows backwards, remember. If you take the address of the x on the stack, its pointing to x followed by y in ascending memory address order... _______________________________________________ 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... This email sent to site_archiver@lists.apple.com
participants (1)
-
Jeff Laing