RISC-V: Add fixed-point arithmetic instructions 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 fixed-point arithmetic instructions for the
"XTheadVector" extension. 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:

	* testsuite/gas/riscv/x-thead-vector.d: Add tests for
	fixed-point arithmetic instructions.
	* testsuite/gas/riscv/x-thead-vector.s: Likewise.

include/ChangeLog:

	* opcode/riscv-opc.h (MATCH_TH_VAADDVV): New.

opcodes/ChangeLog:

	* riscv-opc.c: Likewise.
This commit is contained in:
Jin Ma
2023-11-18 15:07:20 +08:00
committed by Nelson Chu
parent c63af675b9
commit 9a51da2636
4 changed files with 226 additions and 0 deletions
+12
View File
@@ -2897,6 +2897,18 @@
#define MASK_TH_VSBCVXM 0xfe00707f
#define MATCH_TH_VWMACCSUVV 0xf8002057
#define MASK_TH_VWMACCSUVV 0xfc00707f
#define MATCH_TH_VAADDVV 0x90000057
#define MASK_TH_VAADDVV 0xfc00707f
#define MATCH_TH_VAADDVX 0x90004057
#define MASK_TH_VAADDVX 0xfc00707f
#define MATCH_TH_VAADDVI 0x90003057
#define MASK_TH_VAADDVI 0xfc00707f
#define MATCH_TH_VASUBVV 0x98000057
#define MASK_TH_VASUBVV 0xfc00707f
#define MATCH_TH_VASUBVX 0x98004057
#define MASK_TH_VASUBVX 0xfc00707f
#define MATCH_TH_VWSMACCSUVV 0xf8000057
#define MASK_TH_VWSMACCSUVV 0xfc00707f
/* Vendor-specific (Ventana Microsystems) XVentanaCondOps instructions */
#define MATCH_VT_MASKC 0x607b
#define MASK_VT_MASKC 0xfe00707f