]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
RISC-V: Add CSRs for T-Head VECTOR vendor extension
authorJin Ma <jinma@linux.alibaba.com>
Sat, 18 Nov 2023 06:58:25 +0000 (14:58 +0800)
committerNelson Chu <nelson@rivosinc.com>
Thu, 23 Nov 2023 01:31:29 +0000 (09:31 +0800)
commit6fdd02bb1f5bbeaa4d38b8a39e26ba414a850001
tree88f107408a73304f5adb00b4ee3d9a32c4223967
parent86fbfedd715df8a89d73374d70b1f068f95b450e
RISC-V: Add CSRs for T-Head VECTOR vendor extension

T-Head has a range of vendor-specific instructions.
Therefore it makes sense to group them into smaller chunks
in form of vendor extensions.

This patch adds the CSRs for XTheadVector. Because of the
conflict between encoding and teh 'V' extension, it is implemented
by alias. The 'th' prefix and the "XTheadVector" extension are
documented in a PR for the RISC-V toolchain conventions ([1]).

[1] https://github.com/riscv-non-isa/riscv-toolchain-conventions/pull/19

Co-developed-by: Lifang Xia <lifang_xia@linux.alibaba.com>
Co-developed-by: Christoph Müllner <christoph.muellner@vrull.eu>
gas/ChangeLog:

* config/tc-riscv.c (enum riscv_csr_class): Add the class for
the CSRs of the "XTheadVector" extension.
(riscv_csr_address): Likewise.
* testsuite/gas/riscv/x-thead-vector-csr-warn.d: New test.
* testsuite/gas/riscv/x-thead-vector-csr-warn.l: New test.
* testsuite/gas/riscv/x-thead-vector-csr.d: New test.
* testsuite/gas/riscv/x-thead-vector-csr.s: New test.

include/ChangeLog:

* opcode/riscv-opc.h (DECLARE_CSR_ALIAS): Likewise.

opcodes/ChangeLog:

* riscv-dis.c (print_insn_args): Prefix the CSRs disassembly with 'th'.
gas/config/tc-riscv.c
gas/testsuite/gas/riscv/x-thead-vector-csr-warn.d [new file with mode: 0644]
gas/testsuite/gas/riscv/x-thead-vector-csr-warn.l [new file with mode: 0644]
gas/testsuite/gas/riscv/x-thead-vector-csr.d [new file with mode: 0644]
gas/testsuite/gas/riscv/x-thead-vector-csr.s [new file with mode: 0644]
include/opcode/riscv-opc.h
opcodes/riscv-dis.c