@@ -95,9 +95,12 @@ The base integer calling convention provides eight argument registers,
9595a0-a7, the first two of which are also used to return values.
9696
9797Scalars that are at most XLEN bits wide are passed in a single argument
98- register, or on the stack by value if none is available. When passed in
99- registers, scalars narrower than XLEN bits are widened according to the sign
100- of their type up to 32 bits, then sign-extended to XLEN bits.
98+ register, or on the stack by value if none is available.
99+ When passed in registers or on the stack, integer scalars narrower than XLEN
100+ bits are widened according to the sign of their type up to 32 bits, then
101+ sign-extended to XLEN bits.
102+ When passed in registers or on the stack, floating-point types narrower than
103+ XLEN bits are widened to XLEN bits, with the upper bits undefined.
101104
102105Scalars that are 2✕XLEN bits wide are passed in a pair of argument registers,
103106with the low-order XLEN bits in the lower-numbered register and the high-order
@@ -119,8 +122,8 @@ available, the aggregate is passed on the stack. Bits unused due to
119122padding, and bits past the end of an aggregate whose size in bits is not
120123divisible by XLEN, are undefined.
121124
122- Aggregates or scalars passed on the stack are aligned to the minimum of the
123- object alignment and the stack alignment.
125+ Aggregates or scalars passed on the stack are aligned to the greater of the
126+ type alignment and XLEN bits, but never more than the stack alignment.
124127
125128Aggregates larger than 2✕XLEN bits are passed by reference and are replaced in
126129the argument list with the address, as are C++ aggregates with nontrivial copy
@@ -214,6 +217,8 @@ A real floating-point argument is passed in a floating-point argument
214217register if it is no more than FLEN bits wide and at least one floating-point
215218argument register is available. Otherwise, it is passed according to the
216219integer calling convention.
220+ When a floating-point argument narrower than FLEN bits is passed in a
221+ floating-point register, it is 1-extended (NaN-boxed) to FLEN bits.
217222
218223A struct containing just one floating-point real is passed as though it were
219224a standalone floating-point real.
0 commit comments