Structs pushed on stack backwards?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Hi, struct PseudoPoint { float x; float y; }; and it gets passed as a parameter on the stack as: y x Any clues would be greatly appreciated. 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... I just had some time to get back to my current recreational programming task: Writing a little compiler on OS X. Now, I've got most of it working, but one thing confuses me a bit: <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 Wouldn't it be easier to leave everything in its proper order? What's the rationale behind this? This email sent to site_archiver@lists.apple.com
participants (1)
-
Uli Kusterer