
24 Jun
2009
24 Jun
'09
9:48 p.m.
On Wed, Jun 24, 2009 at 10:23:29AM -0300, Maurício wrote:
However, isn't just knowing the size and alignment enough to write a generic struct handler that, by using the appropriate calling convention, is going to work with any struct? If not, I agree with you it's really not worth it (as we can use pointers as Felipe sugested.
No, unfortunately it is not. Depending on the actual data types inside the struct, values may be passed in registers, the stack, or split between the two. for instance, the floating point values in a given struct may be passed in SSE registers on x86-64, while the integral parts are passed in normal registers. John -- John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/