changeset 119:f1cc11a9eb98

- mips64 manual appendix clarifications
author cslag
date Mon, 04 Jul 2016 00:59:59 +0200
parents f0437f85091b
children 8a6111c2a84a
files doc/manual/callconvs/callconv_mips64.tex
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/doc/manual/callconvs/callconv_mips64.tex	Sun Jul 03 01:41:43 2016 +0200
+++ b/doc/manual/callconvs/callconv_mips64.tex	Mon Jul 04 00:59:59 2016 +0200
@@ -67,10 +67,11 @@
 \item Stack grows down
 \item Stack parameter order: right-to-left
 \item Caller cleans up the stack
-\item first 8 integers (<= 64-bit)are passed in registers \$a0-\$a7
-\item first 8 floating point arguments (single or double precision) are passed in registers \$f12-\$f19
-\item if either integer or float registers are used up, the stack is used
+\item first 8 params \textgreater=\ 64-bit are passed in registers \$a0-\$a7 for integers and \$f12-\$f19 for floats - with mixed float and int parameters,
+some registers are left out (e.g. first parameter ends up in \$a0 or \$f12, second in \$a1 or \$f13, etc.)
+\item subsequent arguments are pushed onto the stack
 \item all stack entries are 64-bit aligned
+\item all stack regions are 16-byte aligned
 \item results are returned in \$v0, and for a second one \$v1 is used
 \item float arguments passed in the variable part of a vararg call are passed like integers
 \end{itemize}
@@ -78,6 +79,7 @@
 \paragraph{Stack layout}
 
 Stack directly after function prolog:\\
+@@@ WIP, might be wrong
 
 \begin{figure}[h]
 \begin{tabular}{5|3|1 1}
@@ -92,7 +94,7 @@
                                 & \ldots       &                                &                              \\
                                 & \ldots       &                                &                              \\
 \hhline{~=~~}
-register save area              & padding? @@@ &                                & \mrrbrace{7}{current frame}  \\
+register save area              & padding      &                                & \mrrbrace{7}{current frame}  \\
                                 & \$ra         &                                &                              \\
                                 & \$s8         &                                &                              \\
                                 & \$gp         &                                &                              \\