]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Added zvfh support for zfa extensions.
authorJin Ma <jinma@linux.alibaba.com>
Tue, 29 Aug 2023 17:01:55 +0000 (11:01 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Tue, 29 Aug 2023 17:01:55 +0000 (11:01 -0600)
commitfce74ce2535aa3b7648ba82e7e61eb77d0175546
treeb1037a04117730685a7ebb285af88ca04f881e70
parent6e23440b5df4011bbe1dbee74d47641125dd7d16
RISC-V: Added zvfh support for zfa extensions.

This is a follow-up for the zfa extension, added according to the recommendations
for zvfh and patch of Tsukasa OI <research_trasio@irq.a4lg.com>. At the same time,
zfa-fli-5.c of which is also based on the patch.

Ref:
https://gcc.gnu.org/pipermail/gcc-patches/2023-August/627284.html
https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628492.html

gcc/ChangeLog:

* config/riscv/riscv.cc (riscv_float_const_rtx_index_for_fli):
zvfh can generate zfa extended instruction fli.h, just like zfh.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/zfa-fli-7.c: Change fa0 to fa\[0-9\] to avoid
assigning register numbers that are non-zero.
* gcc.target/riscv/zfa-fli-8.c: Ditto.
* gcc.target/riscv/zfa-fli-5.c: New test.
gcc/config/riscv/riscv.cc
gcc/testsuite/gcc.target/riscv/zfa-fli-5.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/zfa-fli-7.c
gcc/testsuite/gcc.target/riscv/zfa-fli-8.c