On 23/10/2026 08:08, fir wrote:
from longer time i think if in c should be not one calling convention
(or mainly the one)
the one is
( output* out) foo(input* in)
{
}
i mean all argument should be passed by one pointer,
not passed by stack it should be passed by register,
same as to output - all values should be returned by
outupu pointer also by register
For most calling conventions, "in" would be passed in a register and
"out" returned in a register. The details are from the platform ABI,
and are not relevant to the C language.
And if you want your inputs and outputs to be structs, you can already
do that in C. If these structs are under a certain size (determined by
the ABI), they are typically passed and returned directly in registers -
if they are bigger, they are passed using pointers to structs. (The
caller makes the struct for the parameter, and space for the return struct.)
You might like to try using godbolt.org and looking at the generated
assembly to see what code is actually generated.
--- PyGate Linux v1.5.19
* Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)