Opened 5 years ago

Last modified 5 years ago

#15636 closed task

Document ABI conventions — at Version 3

Reported by: X512 Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: System Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by X512)

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 including alignment origin.
  • 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 as BPoint are passed by pointer.
  • BView::StrokeLine(BPoint, BPoint, pattern) is not working if stack is not aligned.

Change History (3)

comment:1 by X512, 5 years ago

Description: modified (diff)

comment:3 by X512, 5 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.