RISC-V: Fix a bug that is the CMO builtins are missing parameter
authoryulong <shiyulong@iscas.ac.cn>
Wed, 8 Jun 2022 02:19:21 +0000 (10:19 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Mon, 20 Jun 2022 08:44:40 +0000 (16:44 +0800)
commit970b03c0037549a571ecea9afa41de78eb859b3a
treefcb07351962f5c60a29019c87a446c8f3439b936
parente058dfc43fa0df112293584e8f48f6f2cfa3e72a
RISC-V: Fix a bug that is the CMO builtins are missing parameter

We changed builtins format about zicbom and zicboz subextensions and modified test cases.

diff with the previous version:
1.We modified the FUNCTION_TYPE from RISCV_VOID_FTYPE_SI/DI to RISCV_VOID_FTYPE_VOID_PTR.
2.We added a new RISCV_ATYPE_VOID_PTR in riscv-builtins.cc and a new DEF_RISCV_FTYPE (1, (VOID, VOID_PTR)) in riscv-ftypes.def.
3.We deleted DEF_RISCV_FTYPE (1, (VOID, SI/DI)).
4.We modified the input parameters of the test cases.

Thanks, Simon and Kito.

gcc/ChangeLog:

* config/riscv/riscv-builtins.cc (RISCV_ATYPE_VOID_PTR): New.
* config/riscv/riscv-cmo.def (RISCV_BUILTIN): Changed the FUNCTION_TYPE
of RISCV_BUILTIN.
* config/riscv/riscv-ftypes.def (0): Remove unused.
(1): New.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/cmo-zicbom-1.c: modified the input parameters.
* gcc.target/riscv/cmo-zicbom-2.c: modified the input parameters.
* gcc.target/riscv/cmo-zicboz-1.c: modified the input parameters.
* gcc.target/riscv/cmo-zicboz-2.c: modified the input parameters.
gcc/config/riscv/riscv-builtins.cc
gcc/config/riscv/riscv-cmo.def
gcc/config/riscv/riscv-ftypes.def
gcc/testsuite/gcc.target/riscv/cmo-zicbom-1.c
gcc/testsuite/gcc.target/riscv/cmo-zicbom-2.c
gcc/testsuite/gcc.target/riscv/cmo-zicboz-1.c
gcc/testsuite/gcc.target/riscv/cmo-zicboz-2.c