Mercurial > pub > dyncall > dyncall
diff doc/manual/callconvs/callconv_ppc64.tex @ 499:fc614cb865c6
- doc and disasexample additions specific to non-trivial C++ aggregates as return values (incl. fixes to doc and additional LSB specific PPC32 section)
author | Tassilo Philipp |
---|---|
date | Mon, 04 Apr 2022 15:50:52 +0200 |
parents | ead041d93e36 |
children | 0909837648d2 |
line wrap: on
line diff
--- a/doc/manual/callconvs/callconv_ppc64.tex Wed Mar 23 15:33:09 2022 +0100 +++ b/doc/manual/callconvs/callconv_ppc64.tex Mon Apr 04 15:50:52 2022 +0200 @@ -105,6 +105,7 @@ \item vector parameters are aligned on 16-byte boundaries \item integer parameters \textless\ 64 bit are right-justified (meaning occupy higher-address bytes) in their 8-byte slot on the stack, requiring extra-care for big-endian targets \item aggregates (struct, union) are passed as a sequence of doublewords (following above rules for doublewords) +\item {\it non-trivial} C++ aggregates (as defined by the language) of any size, are passed indirectly via a pointer to a copy of the aggregate \end{itemize} @@ -114,8 +115,8 @@ \item return values of integer \textless=\ 32bit or pointer type use gpr3 and are zero or sign extended depending on their type \item 64 bit integers use gpr3 \item floating point values are returned via fpr1 -\item for aggregates (struct, union) of any size, a secret first parameter with an address -to a caller allocated space is passed to the function (in gpr3), which is written to by the callee +\item for any aggregate (struct, union), the caller allocates space, passes pointer to it to the callee as a hidden first param +(meaning in gpr3), and callee writes return value to this space; the ptr to the aggregate is returned in gpr3 \end{itemize}