Hello Duncan,
Tuesday, June 30, 2009, 12:03:15 AM, you wrote:
> struct ex {
> int x;
> int y;
> int z;
> };
> ex example_functions (ex p)
afaik, there is C ABI, that defines how to pass and return parameters
of simple types, it's common for all compilers supporting so-called
"cdecl" on any architecture (x86, x86-64, ppc, so on). C ABI doesn't
define how to pass structures, so we can't generate universal
assembler code for this example - it depends on what compiler we want
to interact to
moreover, even for pointers-to-structures, there is no definitive
layout due to packing problem
OTOH, we could try to use gcc agreements
--
Best regards,
Bulat mailto:Bulat.Ziganshin at gmail.com