Porting gdc/dmd to Hurd

Walter Bright newshound2 at digitalmars.com
Sat Mar 21 00:18:29 UTC 2026


The struct call/return ABI is always badly/erroneously documented, and every 
platform has to reinvent it in an undocumented, maddening way.

The way I deal with it is to write trivial C programs:
```C
struct S { int a; }
struct S test(struct S *p) { return *p; }
```

Compile it with the compiler that comes with the system, and disassemble the 
object file. Then figure out what the instructions are doing.

I've found out that asking grok or google or chatgpt for an AI description of it 
can help a lot.


More information about the Digitalmars-d mailing list