Closed kito-cheng closed 8 months ago
cc. @palmer-dabbelt @JeffreyALaw @preames @topperc @rofirrim @lhtin
- Fixed-length vector are treat as aggregates.
This proposal is great and avoids complicating the passing of fixed-length vectors. But the problem is that it doesn't take advantage of vector registers. Are there any more details about this issue?
GCC and Clang are implemented same ABI rule for fixed-length vectors
Also I tried, GCC currently passes through reference even if the vector size is less than 2*XLEN, which is not according to this proposal. Here is the example: https://godbolt.org/z/3ooovcz7c
Also I tried, GCC currently passes through reference even if the vector size is less than 2*XLEN, which is not according to this proposal. Here is the example: https://godbolt.org/z/3ooovcz7c
That's bug, try to drop v
from the -march
and you will see different way to pass the arguments
This proposal is great and avoids complicating the passing of fixed-length vectors. But the problem is that it doesn't take advantage of vector registers. Are there any more details about this issue?
We need separated calling convention for that case, because not every system has v
, and here is the working draft for that one:
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/tree/fixed-length-vector-cc
Previously, there was no mention of fixed-length vectors in the psABI, however fortunately, GCC and Clang are implemented same ABI rule for fixed-length vectors, so this PR is document the de factor behavior for that.