changeset 41:00310bf92924

- doc - source consistency tweak
author cslag
date Fri, 18 Dec 2015 23:10:37 +0100
parents 02223f76d319
children ecc9403e214a
files doc/manual/callconvs/callconv_arm32.tex dyncallback/dyncall_callback_arm32_arm_apple.s
diffstat 2 files changed, 7 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/doc/manual/callconvs/callconv_arm32.tex	Fri Dec 18 21:05:58 2015 +0100
+++ b/doc/manual/callconvs/callconv_arm32.tex	Fri Dec 18 23:10:37 2015 +0100
@@ -228,8 +228,8 @@
 
 The ARM EABI is very similar to the ABI outlined in ARM-THUMB procedure call
 standard (ATPCS) \cite{ATPCS} - however, the EABI requires the stack to be
-8-byte aligned at function entries, as well as 64 bit parameters. The latter
-are aligned on 8-byte boundaries on the stack and 2-registers for parameters
+8-byte aligned at function entries, as well as for 64 bit parameters. The latter
+are aligned on 8-byte boundaries on the stack and 2-registers for a parameter
 passed via register. In order to achieve such an alignment, a register might
 have to be skipped for parameters passed via registers, or 4-bytes on the stack
 for parameters passed via the stack. Refer to the Debian ARM EABI port wiki
@@ -293,10 +293,10 @@
 
 
 Most debian-based Linux systems on ARMv7 (or ARMv6 with FPU) platforms use a calling convention referred to
-as armhf, using 16 64-bit floating point registers of the FPU of the VFPv3-D16 extension to the ARM architecture.
+as armhf, using 16 32-bit floating point registers of the FPU of the VFPv3-D16 extension to the ARM architecture.
 The instruction set used for armhf is Thumb-2. Refer to the debian wiki for more information \cite{armhf}.
 
-Code is little-endian, rest is similar to EABI, 8-byte aligned stack, etc..
+Code is little-endian, rest is similar to EABI with an 8-byte aligned stack, etc..
 
 \paragraph{Register usage}
 
@@ -333,11 +333,10 @@
 \item stack parameter order: right-to-left
 \item caller cleans up the stack
 \item first four non-floating-point words are passed using r0-r3
-\item first 16 single-precision, or 8 double-precision arguments are passed via s0-s15 or d0-d7, respectively
+\item first 16 single-precision, or 8 double-precision arguments are passed via s0-s15 or d0-d7, respectively (note that since s and d registers are aliased, already used ones are skipped)
 \item subsequent parameters are pushed onto the stack (in right to left order, such that the stack pointer points to the first of the remaining parameters)
-\item if the callee takes the address of one of the parameters and uses it to address other parameters (e.g. varargs) it has to copy - in its prolog - the first four words to a reserved stack area adjacent to the other parameters on the stack @@@?check doc
+\item if the callee takes the address of one of the parameters and uses it to address other parameters (e.g. varargs) it has to copy - in its prolog - the first four words to a reserved stack area adjacent to the other parameters on the stack @@@?check spilling of float args, also
 \item parameters \textless=\ 32 bits are passed as 32 bit words
-\item 64 bit parameters are passed as two 32 bit parts (even partly via the register and partly via the stack, although this doesn't seem to be specified in the ATPCS), with the loword coming first @@@?check doc
 \item structures and unions are passed by value, with the first four words of the parameters in r0-r3 @@@?check doc
 \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})
 \end{itemize}
--- a/dyncallback/dyncall_callback_arm32_arm_apple.s	Fri Dec 18 21:05:58 2015 +0100
+++ b/dyncallback/dyncall_callback_arm32_arm_apple.s	Fri Dec 18 23:10:37 2015 +0100
@@ -32,13 +32,13 @@
 /* sizes */
 .set DCThunk_size   ,   8
 .set DCArgs_size    ,  24
+.set DCCallback_size,  20
 .set DCValue_size   ,   8
 
 /* struct DCCallback offsets and size */
 .set CTX_thunk      ,   0
 .set CTX_handler    ,  12
 .set CTX_userdata   ,  16
-.set DCCallback_size,  20
 
 
 /* Called by thunk - thunk stores pointer to DCCallback in r12 */