comparison doc/manual/callconvs/callconv_sparc64.tex @ 475:5be9f5ccdd35

- doc: ppc64 clarifications
author Tassilo Philipp
date Sat, 19 Feb 2022 19:27:22 +0100
parents c9e19249ecd3
children 6c72cb768099
comparison
equal deleted inserted replaced
474:c9e19249ecd3 475:5be9f5ccdd35
71 \item single precision floating point args are passed in odd \%f* registers, and are "right aligned" in their 8-byte space on the stack 71 \item single precision floating point args are passed in odd \%f* registers, and are "right aligned" in their 8-byte space on the stack
72 \item for every argument passed, corresponding \%o*, \%f* register or stack space is skipped (e.g. passing a double as 3rd call argument, \%d4 is used and \%o2 is skipped) 72 \item for every argument passed, corresponding \%o*, \%f* register or stack space is skipped (e.g. passing a double as 3rd call argument, \%d4 is used and \%o2 is skipped)
73 \item all arguments \textless=\ 64 bit are passed as 64 bit values 73 \item all arguments \textless=\ 64 bit are passed as 64 bit values
74 \item minimum stack size is 128 bytes, b/c stack pointer must always point at enough space to store all \%i* and \%l* registers, used when running out of register windows 74 \item minimum stack size is 128 bytes, b/c stack pointer must always point at enough space to store all \%i* and \%l* registers, used when running out of register windows
75 \item if needed, register spill area (both, integer and float arguments are spilled in order) is adjacent to parameters 75 \item if needed, register spill area (both, integer and float arguments are spilled in order) is adjacent to parameters
76 \item aggregates (struct, union) \textless=\ 16 bytes are passed field-by-field, {\bf however} evaluated as a sequence of 8-byte parameter slots 76 \item structs with only one field are passed as if the param would be the field itself
77 \item structs \textless=\ 16 bytes (which have more than one field) are passed field-by-field, {\bf however} evaluated as a sequence of 8-byte parameter slots
77 \begin{itemize} 78 \begin{itemize}
79 \item note that due to aggregate alignment rules, any floating point value is either the entire slot (for double precision) or exactly one half
78 \item fields are left justified in register or stack slots 80 \item fields are left justified in register or stack slots
79 \item integers in a slot are passed as such (either via \%o* registers or the stack) 81 \item integers in a slot are passed as such (either via \%o* registers or the stack)
80 \item single precision floats (using half of the slot) use even numbered \%f* registers when they occupy the left half, odd numbered ones otherwise (no register skipping logic applied within a slot) 82 \item single precision floats (using half of the slot) use even numbered \%f* registers when they occupy the left half, odd numbered ones otherwise (no register skipping logic applied within a slot)
81 \item splitting aggregates between registers and stack is allowed 83 \item splitting struct fields between registers and stack is allowed
82 \end{itemize} 84 \end{itemize}
85 \item unions \textless=\ 16 bytes passed by-value are passed like integers in left-justified 8-byte slots (either via \%o* registers or the stack)
83 \item aggregates (struct, union) and types \textgreater\ 16 bytes are passed indirectly, as a pointer to a correctly aligned copy of the data (that copy can be avoided under certain conditions) 86 \item aggregates (struct, union) and types \textgreater\ 16 bytes are passed indirectly, as a pointer to a correctly aligned copy of the data (that copy can be avoided under certain conditions)
84 % from spec: 87 % from spec:
85 %Structure or union types up to eight bytes in size are assigned to one parameter array word, and align to eight-byte 88 %Structure or union types up to eight bytes in size are assigned to one parameter array word, and align to eight-byte
86 %boundaries. 89 %boundaries.
87 %Structure or union types larger than eight bytes, and up to sixteen bytes in size are assigned to two consecutive 90 %Structure or union types larger than eight bytes, and up to sixteen bytes in size are assigned to two consecutive