@@ -197,8 +197,9 @@ register if it is no more than FLEN bits wide and at least one floating-point
197197argument register is available. Otherwise, it is passed according to the
198198integer calling convention.
199199
200- A struct containing just one floating-point real is passed as though it were
201- a standalone floating-point real.
200+ A struct containing just one floating-point real or (as a special case) one
201+ floating-point real and any number of zero-size bitfields is passed as though
202+ it were a standalone floating-point real.
202203
203204A struct containing two floating-point reals is passed in two floating-point
204205registers, if neither is more than FLEN bits wide and at least two floating-point
@@ -215,7 +216,13 @@ without extending the integer to XLEN bits, provided the floating-point real
215216is no more than FLEN bits wide and the integer is no more than XLEN bits wide,
216217and at least one floating-point argument register and at least one integer
217218argument register is available. Otherwise, it is passed according to the
218- integer calling convention.
219+ integer calling convention. Note that the bitfield may have a type that is
220+ larger than XLEN but can still be considered eligible for passing in this way
221+ provided the bitfield size is no more than XLEN bits wide. e.g. `struct {
222+ float f; int64_t i : 32; }` is eligible for being passed in a floating-point
223+ argument register and an integer argument register even when XLEN=32 is 32.
224+ Zero-size bitfields are not ignored, so `struct { float f; int64_t i : 32; int
225+ 0;`} would be passed according to the integer calling convention.
219226
220227Unions are never flattened and are always passed according to the integer
221228calling convention.
0 commit comments