comparison doc/manual/callconvs/callconv_arm32.tex @ 42:ecc9403e214a r0.9-RC3

- final touch for complete armhf callback support, yay - armhf doc updates
author cslag
date Fri, 18 Dec 2015 23:28:18 +0100
parents 00310bf92924
children e5cdf4b4d813
comparison
equal deleted inserted replaced
41:00310bf92924 42:ecc9403e214a
303 \begin{table}[h] 303 \begin{table}[h]
304 \begin{tabular}{3 B} 304 \begin{tabular}{3 B}
305 \hline 305 \hline
306 Name & Brief description\\ 306 Name & Brief description\\
307 \hline 307 \hline
308 {\bf R0} & parameter 0, scratch, return value\\ 308 {\bf R0} & parameter 0, scratch, non floating point return value\\
309 {\bf R1} & parameter 1, scratch, return value\\ 309 {\bf R1} & parameter 1, scratch, non floating point return value\\
310 {\bf R2,R3} & parameters 2 and 3, scratch\\ 310 {\bf R2,R3} & parameters 2 and 3, scratch\\
311 {\bf R4,R5} & permanent\\ 311 {\bf R4,R5} & permanent\\
312 {\bf R6} & scratch\\ 312 {\bf R6} & scratch\\
313 {\bf R7} & frame pointer, permanent\\ 313 {\bf R7} & frame pointer, permanent\\
314 {\bf R8} & permanent\\ 314 {\bf R8} & permanent\\
317 {\bf R12} & scratch, intra-procedure scratch register (IP) used by dynamic linker\\ 317 {\bf R12} & scratch, intra-procedure scratch register (IP) used by dynamic linker\\
318 {\bf R13} & stack pointer, permanent\\ 318 {\bf R13} & stack pointer, permanent\\
319 {\bf R14} & link register, permanent\\ 319 {\bf R14} & link register, permanent\\
320 {\bf R15} & program counter (note: due to pipeline, r15 points to 2 instructions ahead)\\ 320 {\bf R15} & program counter (note: due to pipeline, r15 points to 2 instructions ahead)\\
321 {\bf CPSR} & Program status register\\ 321 {\bf CPSR} & Program status register\\
322 {\bf S0-S15} & floating point arguments, single precision\\ 322 {\bf S0} & floating point argument, floating point return value, single precision\\
323 {\bf D0-D7} & aliases S0-S15, floating point arguments, double precision\\ 323 {\bf D0} & floating point argument, floating point return value, double precision, aliases S0-S1, \\
324 {\bf S1-S15} & floating point arguments, single precision\\
325 {\bf D1-D7} & aliases S2-S15, floating point arguments, double precision\\
324 {\bf FPSCR} & VFP status register.\\ 326 {\bf FPSCR} & VFP status register.\\
325 \hline 327 \hline
326 \end{tabular} 328 \end{tabular}
327 \caption{Register usage on armhf} 329 \caption{Register usage on armhf}
328 \end{table} 330 \end{table}
341 \item if return value is a structure, a pointer pointing to the return value's space is passed in r0, the first parameter in r1, etc. (see {\bf return values}) 343 \item if return value is a structure, a pointer pointing to the return value's space is passed in r0, the first parameter in r1, etc. (see {\bf return values})
342 \end{itemize} 344 \end{itemize}
343 345
344 \paragraph{Return values} 346 \paragraph{Return values}
345 \begin{itemize} 347 \begin{itemize}
346 \item return values \textless=\ 32 bits use r0 348 \item non floating point return values \textless=\ 32 bits use r0
347 \item 64 bit return values use r0 and r1 349 \item non floating point 64-bit return values use r0 and r1
350 \item single precision floating point return value uses s0
351 \item double precision floating point return value uses d0
348 \item if return value is a structure, the caller allocates space for the return value on the stack in its frame and passes a pointer to it in r0 352 \item if return value is a structure, the caller allocates space for the return value on the stack in its frame and passes a pointer to it in r0
349 \end{itemize} 353 \end{itemize}
350 354
351 355
352 356