]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
RISC-V: Add support for Zvfbfwma extension
authorXiao Zeng <zengxiao@eswincomputing.com>
Thu, 6 Jun 2024 07:59:53 +0000 (15:59 +0800)
committerNelson Chu <nelson@rivosinc.com>
Thu, 6 Jun 2024 08:10:53 +0000 (16:10 +0800)
commit0b4595be3f04aa3741157b24654e554fc3264fc2
tree777105142cf7f51e06a3a0ec62d8ffd6dbcb8b96
parentd9c14a8744b01b0d3d03a661c732a4d4d5740fbc
RISC-V: Add support for Zvfbfwma extension

This implements the Zvfbfwma extension, as of version 1.0.
View detailed information in:
<https://github.com/riscv/riscv-isa-manual/blob/main/src/bfloat16.adoc#zvfbfwma---vector-bf16-widening-mul-add>

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 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.

For relevant information in gcc, please refer to:
<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=38dd4e26e07c6be7cf4d169141ee4f3a03f3a09d>

bfd/ChangeLog:

* elfxx-riscv.c (riscv_multi_subset_supports): Handle Zvfbfwma.
(riscv_multi_subset_supports_ext): Ditto.

gas/ChangeLog:

* NEWS: Updated.
* testsuite/gas/riscv/march-help.l: Ditto.
* testsuite/gas/riscv/zvfbfwma.d: New test.
* testsuite/gas/riscv/zvfbfwma.s: New test.

include/ChangeLog:

* opcode/riscv-opc.h (MATCH_VFWMACCBF16_VF): Define.
(MASK_VFWMACCBF16_VF): Ditto.
(MATCH_VFWMACCBF16_VV): Ditto.
(MASK_VFWMACCBF16_VV): Ditto.
(DECLARE_INSN): New declarations for Zvfbfwma.
* opcode/riscv.h (enum riscv_insn_class): Add
INSN_CLASS_ZVFBFWMA

opcodes/ChangeLog:

* riscv-opc.c: Add Zvfbfwma instructions.
bfd/elfxx-riscv.c
gas/NEWS
gas/testsuite/gas/riscv/march-help.l
gas/testsuite/gas/riscv/zvfbfwma.d [new file with mode: 0644]
gas/testsuite/gas/riscv/zvfbfwma.s [new file with mode: 0644]
include/opcode/riscv-opc.h
include/opcode/riscv.h
opcodes/riscv-opc.c