comparison doc/manual/callconvs/callconv_ppc32.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 06c9adae114d
comparison
equal deleted inserted replaced
344:d60728b1f4a1 345:c607d67cd6b8
34 \item There is also the "PowerOpen ABI"\cite{poabi}, a nearly identical version of it is used in AIX % more info: http://www.ingallegri.com/public/ppc.html 34 \item There is also the "PowerOpen ABI"\cite{poabi}, a nearly identical version of it is used in AIX % more info: http://www.ingallegri.com/public/ppc.html
35 \end{itemize} 35 \end{itemize}
36 36
37 \paragraph{\product{dyncall} support} 37 \paragraph{\product{dyncall} support}
38 38
39 \product{Dyncall} and \product{dyncallback} are supported for PowerPC (32bit) Big Endian (MSB), for Darwin's and System V's calling convention. 39 \product{Dyncall} and \product{dyncallback} are supported for PowerPC (32bit)
40 Big Endian (MSB), for Darwin's and System V's calling convention.\\
41 \product{Dyncall} can also be used to issue syscalls by using the syscall
42 number as target parameter and selecting the correct mode.
40 43
41 44
42 \subsubsection{Mac OS X/Darwin} 45 \subsubsection{Mac OS X/Darwin}
43 46
44 \paragraph{Registers and register usage} 47 \paragraph{Registers and register usage}
243 & \vdots & & \\ 246 & \vdots & & \\
244 \end{tabular} 247 \end{tabular}
245 \caption{Stack layout on System V ABI for PowerPC 32-bit calling convention} 248 \caption{Stack layout on System V ABI for PowerPC 32-bit calling convention}
246 \end{figure} 249 \end{figure}
247 250
251
252 \newpage
253
254 \subsubsection{System V syscalls}
255
256 \paragraph{Parameter passing}
257
258 \begin{itemize}
259 \item syscall is issued via the {\em sc} instruction
260 \item kernel destroys registers r13
261 \item syscall number is set in r0
262 \item params are passed in registers r3 through r10
263 \item no stack in use, meaning syscalls are in theory limited to eight arguments
264 \item register r3 holds the return value, overflow flag in conditional register cr0 signals errors in syscall
265 \end{itemize}
266