[haiku-bugs] [Haiku] #15636: Document ABI conventions

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Fri, 17 Jan 2020 13:54:16 -0000

#15636: Document ABI conventions
--------------------+------------------------------
 Reporter:  X512    |        Owner:  nobody
     Type:  task    |       Status:  new
 Priority:  normal  |    Milestone:  Unscheduled
Component:  System  |      Version:  R1/Development
 Keywords:          |   Blocked By:
 Blocking:          |  Has a Patch:  0
 Platform:  All     |
--------------------+------------------------------
 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 as `BPoint` are passed by pointer.
 * `StrokeLine(BPoint, BPoint, pattern)` is not working if stack is not
 aligned.
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/15636>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: