Skip to content

Commit

Permalink
Minor revision
Browse files Browse the repository at this point in the history
- Add rule for single fixed-length vector or fixed-length vector array
  with size 1.
- Add rule for zero-length fixed-length arrays.
- Add explicitly rule for fixed-length vector struct as vector tuple type:
  pass by ref if no enough arg register.
  • Loading branch information
kito-cheng committed Jan 29, 2024
1 parent 2386a73 commit 7683c98
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion riscv-cc.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -495,10 +495,21 @@ it will pass by reference and is replaced in the argument list with the address.
Otherwise, it will use the rule defined in the hardware floating-point calling
convention.

A struct containing just one fixed-length vector or on fixed-length vector
array of length one, it will flattening as a single fixed-length vector argument
if the size of the vector is less than or equal to 8×ABI_VLEN bit.

Struct with zero-length fixed-length arrays use the rule defined in the hardware
floating-point calling convention, which means it won't consume vector argument
register eitehr in C or {Cpp}.

A struct containing just one fixed-length vector array is passed as though it
were a vector tuple type if the size of the base element for the array is less
or equal to 8×ABI_VLEN bit, and the size of the array is less than 8×ABI_VLEN
bit. Otherwise, it will use the rule defined in the hardware floating-point
bit.
If there are not enough vector argument registers to pass the entire struct,
it will pass by reference and is replaced in the argument list with the address.
Otherwise, it will use the rule defined in the hardware floating-point
calling convention.

Unions with fixed-length vectors are always passed according to the integer
Expand Down

0 comments on commit 7683c98

Please sign in to comment.