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

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Fri, 17 Jan 2020 14:55:35 -0000

#15636: Document ABI conventions
-----------------------+----------------------------
   Reporter:  X512     |      Owner:  nobody
       Type:  task     |     Status:  closed
   Priority:  normal   |  Milestone:  Unscheduled
  Component:  System   |    Version:  R1/Development
 Resolution:  invalid  |   Keywords:
 Blocked By:           |   Blocking:
Has a Patch:  0        |   Platform:  All
-----------------------+----------------------------
Changes (by waddlesplash):

 * status:  new => closed
 * resolution:   => invalid

Comment:

 We do not do anything special here, Haiku just uses GCC (now 8) with no
 particular ABI customizations, so we are following the Itanium C++ ABI,
 which is already well documented: https://itanium-cxx-abi.github.io/cxx-
 abi/abi.html

Structs passed by value (such as pattern) are stored on stack as is, but
 classes such as BPoint are passed by pointer.

 Yes, this is because BPoint is somehow not trivially copyable (I think it
 has an explicit copy constructor), so as per the Itanium ABI, it cannot be
 passed in registers.

BView::StrokeLine(BPoint, BPoint, pattern) is not working if stack is
 not aligned.

 GCC assumes the stack is aligned as per the architecture's general
 requirements. This is also not Haiku specific at all.
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/15636#comment:4>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: