-
- Downloads
RISC-V: Add ZVFH extension to the -march= option
This patch would like to add new sub extension (aka ZVFH) to the -march= option. To make it simple, only the sub extension itself is involved in this patch, and the underlying FP16 related RVV intrinsic API depends on the TARGET_ZVFH. The Zvfh extension depends on the Zve32f and Zfhmin extensions. You can locate more information about ZVFH from below spec doc. https://github.com/riscv/riscv-v-spec/blob/master/v-spec.adoc#185-zvfh-vector-extension-for-half-precision-floating-point Signed-off-by:Pan Li <pan2.li@intel.com> gcc/ChangeLog: * common/config/riscv/riscv-common.cc: (riscv_implied_info): Add zvfh item. (riscv_ext_version_table): Ditto. (riscv_ext_flag_table): Ditto. * config/riscv/riscv-opts.h (MASK_ZVFH): New macro. (TARGET_ZVFH): Ditto. gcc/testsuite/ChangeLog: * gcc.target/riscv/arch-21.c: New test. * gcc.target/riscv/predef-27.c: New test.
Showing
- gcc/common/config/riscv/riscv-common.cc 4 additions, 0 deletionsgcc/common/config/riscv/riscv-common.cc
- gcc/config/riscv/riscv-opts.h 2 additions, 0 deletionsgcc/config/riscv/riscv-opts.h
- gcc/testsuite/gcc.target/riscv/arch-21.c 5 additions, 0 deletionsgcc/testsuite/gcc.target/riscv/arch-21.c
- gcc/testsuite/gcc.target/riscv/predef-27.c 55 additions, 0 deletionsgcc/testsuite/gcc.target/riscv/predef-27.c
Loading
Please register or sign in to comment