|
@@ -13485,13 +13485,14 @@ the target. However, \code{callq} does not handle
|
|
|
\item determining how registers are shared by different functions.
|
|
|
\end{enumerate}
|
|
|
|
|
|
-Regarding (1) parameter passing, recall that the following six
|
|
|
-registers are used to pass arguments to a function, in this order.
|
|
|
+Regarding (1) parameter passing, recall that the x86-64 calling convention
|
|
|
+for Unix-based system uses the following six
|
|
|
+registers to pass arguments to a function, in this order.
|
|
|
\begin{lstlisting}
|
|
|
rdi rsi rdx rcx r8 r9
|
|
|
\end{lstlisting}
|
|
|
If there are
|
|
|
-more than six arguments, then the convention is to use space on the
|
|
|
+more than six arguments, then the calling convention mandates to use space on the
|
|
|
frame of the caller for the rest of the arguments. However, to ease
|
|
|
the implementation of efficient tail calls
|
|
|
(Section~\ref{sec:tail-call}), we arrange never to need more than six
|