Opened 5 years ago
Last modified 5 years ago
#15636 closed task
Document ABI conventions — at Initial Version
Reported by: | X512 | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | System | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
ABI conventions used by Haiku for each architecture (x86 gcc2, x86 gcc4+, x86_64) should be documented in some way (in web site, HaikuBook etc.).
At least following topics should be documented:
- Preserved registers, including SIMD registers etc.
- FPU state.
- Passing arguments to function and return value.
- Stack alignment.
- Exception handling and stack unwinding.
- Executable format.
If Haiku use some existing ABI, it should be referenced in documentation with Haiku specific changes, if any.
I tried to port some non C/C++ compiler (target ABI: x86 gcc4+) and make Haiku API bindings and experience various problems such as:
- Structs passed by value (such as
pattern
) are stored on stack as is, but classes such asBPoint
are passed by pointer. StrokeLine(BPoint, BPoint, pattern)
is not working if stack is not aligned.
Note:
See TracTickets
for help on using tickets.