Structs pushed on stack backwards?
Structs pushed on stack backwards?
- Subject: Structs pushed on stack backwards?
- From: Uli Kusterer <email@hidden>
- Date: Sun, 29 Apr 2007 16:18:21 +0200
Hi,
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
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?
What's the rationale behind this?
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden