aboutsummaryrefslogtreecommitdiff
path: root/gcc/coverage.cc
diff options
context:
space:
mode:
authorLehua Ding <lehua.ding@rivai.ai>2023-06-14 19:56:11 +0800
committerPan Li <pan2.li@intel.com>2023-06-15 09:18:30 +0800
commit0ec3fbb5903ac3ad735b3154e814b46724fe1a27 (patch)
treed98640bce14e3f5bab6fb582e32a53bf64ef0ff1 /gcc/coverage.cc
parent41738a1b3f333d0283fe911f715194f602d318f6 (diff)
downloadgcc-0ec3fbb5903ac3ad735b3154e814b46724fe1a27.zip
gcc-0ec3fbb5903ac3ad735b3154e814b46724fe1a27.tar.gz
gcc-0ec3fbb5903ac3ad735b3154e814b46724fe1a27.tar.bz2
RISC-V: Ensure vector args and return use function stack to pass [PR110119]
The V2 patch address comments from Juzhe, thanks. Hi, The reason for this bug is that in the case where the vector register is set to a fixed length (with `--param=riscv-autovec-preference=fixed-vlmax` option), TARGET_PASS_BY_REFERENCE thinks that variables of type vint32m1 can be passed through two scalar registers, but when GCC calls FUNCTION_VALUE (call function riscv_get_arg_info inside) it returns NULL_RTX. These two functions are not unified. The current treatment is to pass all vector arguments and returns through the function stack, and a new calling convention for vector registers will be added in the future. https://github.com/riscv-non-isa/riscv-elf-psabi-doc/ https://github.com/palmer-dabbelt/riscv-elf-psabi-doc/commit/126fa719972ff998a8a239c47d506c7809aea363 Best, Lehua gcc/ChangeLog: PR target/110119 * config/riscv/riscv.cc (riscv_get_arg_info): Return NULL_RTX for vector mode (riscv_pass_by_reference): Return true for vector mode gcc/testsuite/ChangeLog: PR target/110119 * gcc.target/riscv/rvv/base/pr110119-1.c: New test. * gcc.target/riscv/rvv/base/pr110119-2.c: New test.
Diffstat (limited to 'gcc/coverage.cc')
0 files changed, 0 insertions, 0 deletions