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
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.
from longer time i think if in c should be not one calling convention
(or mainly the one)[...]
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)
{
}
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)
{
}
This disablea function style calls as in Lisp and convert your language
into verbose assembly code (like Ada).
On 10/22/2026 11:08 PM, fir wrote:
from longer time i think if in c should be not one calling convention
(or mainly the one)[...]
You don't like __cdecl? ;^)
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,142 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 135:29:48 |
| Calls: | 14,707 |
| Calls today: | 1 |
| Files: | 186,498 |
| D/L today: |
1,120 files (344M bytes) |
| Messages: | 2,552,863 |