comparison doc/manual/callconvs/callconv_ppc64.tex @ 345:c607d67cd6b8 r1.1-RC2

- doc: added syscall info to appendix, fixed broken literature link - cleanup, added missing forward declarations, ...
author Tassilo Philipp
date Tue, 07 Jan 2020 21:52:57 +0100
parents 74c056b597b7
children b47168dacba6
comparison
equal deleted inserted replaced
344:d60728b1f4a1 345:c607d67cd6b8
31 \item Linux PPC 64-bit ABI is specified in "64-bit PowerPC ELF Application Binary Interface Supplement"\cite{ppcelf64abi} which is based on "System V ABI". 31 \item Linux PPC 64-bit ABI is specified in "64-bit PowerPC ELF Application Binary Interface Supplement"\cite{ppcelf64abi} which is based on "System V ABI".
32 \end{itemize} 32 \end{itemize}
33 33
34 \paragraph{\product{dyncall} support} 34 \paragraph{\product{dyncall} support}
35 35
36 \product{Dyncall} supports PowerPC (64bit) Big Endian and Little Endian ELF ABIs on System V systems (Linux, etc.), including syscalls. Mac OS X is not supported. 36 \product{Dyncall} and \product{dyncallback} are supported for PowerPC (64bit)
37 Big Endian and Little Endian ELF ABIs on System V systems. Mac OS X is not
38 supported.\\
39 \product{Dyncall} can also be used to issue syscalls by using the syscall
40 number as target parameter and selecting the correct mode.
37 41
38 42
39 \subsubsection{PPC64 ELF ABI} 43 \subsubsection{PPC64 ELF ABI}
40 44
41 \paragraph{Registers and register usage} 45 \paragraph{Registers and register usage}
150 linkage area & \vdots & & \\ 154 linkage area & \vdots & & \\
151 \end{tabular} 155 \end{tabular}
152 \caption{Stack layout on ppc64 ELF ABI} 156 \caption{Stack layout on ppc64 ELF ABI}
153 \end{figure} 157 \end{figure}
154 158
159
160 \newpage
161
162 \subsubsection{System V syscalls}
163
164 \paragraph{Parameter passing}
165
166 \begin{itemize}
167 \item syscall is issued via the {\em sc} instruction
168 \item kernel destroys registers r13
169 \item syscall number is set in r0
170 \item params are passed in registers r3 through r10
171 \item no stack in use, meaning syscalls are in theory limited to eight arguments
172 \item register r3 holds the return value, overflow flag in conditional register cr0 signals errors in syscall
173 \end{itemize}
174