Re: [PATCH 1/2] RISC-V: Add Zvdota extension classes

Jeffrey Law via Binutils <[email protected]>
Newsgroups gmane.comp.gnu.binutils
Message-ID <[email protected]>

On 6/29/2026 9:34 PM, Jiawei wrote:
> This patch adds assembler/disassembler support for the RISC-V Zvdota family of extensions [1], which compute a dot product between two vector register groups.
>
> The Zvdota extension family includes the following extensions:
>
> Zvqwdota8i: dot product of 8-bit integers with 32-bit accumulation.
> Zvqwdota16i: dot product of 16-bit integers with 64-bit accumulation.
> Zvfwdota16bf: dot product of bfloat16 floating-point numbers with 32-bit accumulation.
> Zvfqwdota8f: dot product of 8-bit floating-point numbers with 32-bit accumulation.
>
> Zvdota also uses the vtype alternative format bit, altfmt, which is bit 8 of the vtype CSR. This patch adds symbolic e8alt and e16alt vsew constants for vsetvli/vsetivli so that assembly code can select the alternative element formats required by these dot-product instructions.
>
> [1] https://github.com/riscv/riscv-isa-manual/blob/zvbdot/src/zvdota.adoc
>
> bfd/ChangeLog:
>
> 	* elfxx-riscv.c (riscv_implicit_subsets): New implies.
> 	(riscv_supported_std_z_ext): New extensions.
> 	(riscv_multi_subset_supports): Ditto.
> 	(riscv_multi_subset_supports_ext): Ditto.
>
> gas/ChangeLog:
>
> 	* NEWS: Add zvqwdota8i, zvqwdota16i, zvfwdota16bf and
> 	zvfqwdota8f extensions.
> 	* config/tc-riscv.c (riscv_vsew_altfmt): New vsew altfmt
> 	constants array for e8alt and e16alt.
> 	(riscv_vtype_altfmt_supported): New function.
> 	(my_getVsetvliExpression): Ditto.
> 	* testsuite/gas/riscv/march-help.l: New test.
> 	* testsuite/gas/riscv/vector-vtype-altfmt.d: Ditto.
> 	* testsuite/gas/riscv/vector-vtype-altfmt.s: Ditto.
> 	* testsuite/gas/riscv/zvdota.d: Ditto.
> 	* testsuite/gas/riscv/zvdota.s: Ditto.
>
> include/ChangeLog:
>
> 	* opcode/riscv-opc.h (MATCH_VQWDOTAU_VV, MASK_VQWDOTAU_VV): New encoding.
> 	(MATCH_VQWDOTAS_VV, MASK_VQWDOTAS_VV): Ditto.
> 	(MATCH_VFWDOTA_VV, MASK_VFWDOTA_VV): Ditto.
> 	(MATCH_VFQWDOTA_VV, MASK_VFQWDOTA_VV): Ditto.
> 	(MATCH_VFQWDOTA_ALT_VV, MASK_VFQWDOTA_ALT_VV): Ditto.
> 	(DECLARE_INSN): New declarations.
> 	* opcode/riscv.h (OP_MASK_VTYPE_ALTFMT, OP_SH_VTYPE_ALTFMT): New vtype altfmt.
> 	(enum riscv_insn_class): New extension classes.
>
> opcodes/ChangeLog:
>
> 	* riscv-dis.c (print_insn_args): Add altfmt support.
> 	* riscv-opc.c (riscv_opcodes): New instructions.
THanks!  I've pushed both patches in this series to the trunk.

jeff
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.