]> gcc.gnu.org Git - gcc.git/commit
RISC-V: Add Zvfbfwma extension to the -march= option
authorXiao Zeng <zengxiao@eswincomputing.com>
Wed, 15 May 2024 02:03:40 +0000 (10:03 +0800)
committerXiao Zeng <zengxiao@eswincomputing.com>
Thu, 16 May 2024 01:11:46 +0000 (09:11 +0800)
commit38dd4e26e07c6be7cf4d169141ee4f3a03f3a09d
tree6e723a04dbbc6706aa949f55f9b5d93e06e68711
parent090714e6cf8029f4ff8883dce687200024adbaeb
RISC-V: Add Zvfbfwma extension to the -march= option

This patch would like to add new sub extension (aka Zvfbfwma) to the
-march= option. It introduces a new data type BF16.

1 In spec: "Zvfbfwma requires the Zvfbfmin extension and the Zfbfmin extension."
  1.1 In Embedded    Processor: Zvfbfwma -> Zvfbfmin -> Zve32f
  1.2 In Application Processor: Zvfbfwma -> Zvfbfmin -> V
  1.3 In both scenarios, there are: Zvfbfwma -> Zfbfmin

2 Zvfbfmin's information is in:
<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=1ddf65c5fc6ba7cf5826e1c02c569c923a541c09>

3 Zfbfmin's formation is in:
<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=35224ead63732a3550ba4b1332c06e9dc7999c31>

4 Depending on different usage scenarios, the Zvfbfwma extension may
depend on 'V' or 'Zve32f'. This patch only implements dependencies in
scenario of Embedded Processor. This is consistent with the processing
strategy in Zvfbfmin. In scenario of Application Processor, it is
necessary to explicitly indicate the dependent 'V' extension.

5 You can locate more information about Zvfbfwma from below spec doc:
<https://github.com/riscv/riscv-bfloat16/releases/download/v59042fc71c31a9bcb2f1957621c960ed36fac401/riscv-bfloat16.pdf>

gcc/ChangeLog:

* common/config/riscv/riscv-common.cc:
(riscv_implied_info): Add zvfbfwma item.
(riscv_ext_version_table): Ditto.
(riscv_ext_flag_table): Ditto.
* config/riscv/riscv.opt:
(MASK_ZVFBFWMA): New macro.
(TARGET_ZVFBFWMA): Ditto.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/arch-37.c: New test.
* gcc.target/riscv/arch-38.c: New test.
* gcc.target/riscv/predef-36.c: New test.
* gcc.target/riscv/predef-37.c: New test.
gcc/common/config/riscv/riscv-common.cc
gcc/config/riscv/riscv.opt
gcc/testsuite/gcc.target/riscv/arch-37.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/arch-38.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/predef-36.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/predef-37.c [new file with mode: 0644]
This page took 0.0575 seconds and 5 git commands to generate.