diff options
author | Xiao Zeng <zengxiao@eswincomputing.com> | 2024-06-12 09:28:17 +0800 |
---|---|---|
committer | Nelson Chu <nelson@rivosinc.com> | 2024-08-06 13:10:31 +0800 |
commit | 3ba06284d2cada7a4798f7849da113661aff07dd (patch) | |
tree | a74368d34a575e87dae3f1a7419e4b4469e7949b /include | |
parent | 60d4fed4e364bab01d3f835f9cc0e036070e75ba (diff) | |
download | gdb-3ba06284d2cada7a4798f7849da113661aff07dd.zip gdb-3ba06284d2cada7a4798f7849da113661aff07dd.tar.gz gdb-3ba06284d2cada7a4798f7849da113661aff07dd.tar.bz2 |
RISC-V: Add support for Zimop extension
This implements the Zimop (May-Be-Operations) extension, as of version 1.0.
View detailed information in:
<https://github.com/riscv/riscv-isa-manual/blob/main/src/zimop.adoc>
bfd/ChangeLog:
* elfxx-riscv.c (riscv_multi_subset_supports): Handle Zimop
(riscv_multi_subset_supports_ext): Ditto.
gas/ChangeLog:
* NEWS: Updated.
* testsuite/gas/riscv/march-help.l: Ditto.
* testsuite/gas/riscv/zimop.d: New test.
* testsuite/gas/riscv/zimop.s: New test.
include/ChangeLog:
* opcode/riscv-opc.h (DECLARE_INSN): New declarations for Zimop.
(MATCH_MOP_R_0, MATCH_MOP_R_1, MATCH_MOP_R_2, MATCH_MOP_R_3,
MATCH_MOP_R_4, MATCH_MOP_R_5, MATCH_MOP_R_6, MATCH_MOP_R_7,
MATCH_MOP_R_8, MATCH_MOP_R_9, MATCH_MOP_R_10, MATCH_MOP_R_11,
MATCH_MOP_R_12, MATCH_MOP_R_13, MATCH_MOP_R_14, MATCH_MOP_R_15,
MATCH_MOP_R_16, MATCH_MOP_R_17, MATCH_MOP_R_18, MATCH_MOP_R_19,
MATCH_MOP_R_20, MATCH_MOP_R_21, MATCH_MOP_R_22, MATCH_MOP_R_23,
MATCH_MOP_R_24, MATCH_MOP_R_25, MATCH_MOP_R_26, MATCH_MOP_R_27,
MATCH_MOP_R_28, MATCH_MOP_R_29, MATCH_MOP_R_30, MATCH_MOP_R_31,
MATCH_MOP_RR_0, MATCH_MOP_RR_1, MATCH_MOP_RR_2, MATCH_MOP_RR_3,
MATCH_MOP_RR_4, MATCH_MOP_RR_5, MATCH_MOP_RR_6, MATCH_MOP_RR_7): Define.
(MASK_MOP_R_0, MASK_MOP_R_1, MASK_MOP_R_2, MASK_MOP_R_3, MASK_MOP_R_4,
MASK_MOP_R_5, MASK_MOP_R_6, MASK_MOP_R_7, MASK_MOP_R_8, MASK_MOP_R_9,
MASK_MOP_R_10, MASK_MOP_R_11, MASK_MOP_R_12, MASK_MOP_R_13,
MASK_MOP_R_14, MASK_MOP_R_15, MASK_MOP_R_16, MASK_MOP_R_17,
MASK_MOP_R_18, MASK_MOP_R_19, MASK_MOP_R_20, MASK_MOP_R_21,
MASK_MOP_R_22, MASK_MOP_R_23, MASK_MOP_R_24, MASK_MOP_R_25,
MASK_MOP_R_26, MASK_MOP_R_27, MASK_MOP_R_28, MASK_MOP_R_29,
MASK_MOP_R_30, MASK_MOP_R_31, MASK_MOP_RR_0, MASK_MOP_RR_1,
MASK_MOP_RR_2, MASK_MOP_RR_3, MASK_MOP_RR_4, MASK_MOP_RR_5,
MASK_MOP_RR_6, MASK_MOP_RR_7): Ditto.
* opcode/riscv.h (enum riscv_insn_class): Add INSN_CLASS_ZIMOP.
opcodes/ChangeLog:
* riscv-opc.c: Add Zimop instructions.
Diffstat (limited to 'include')
-rw-r--r-- | include/opcode/riscv-opc.h | 122 | ||||
-rw-r--r-- | include/opcode/riscv.h | 1 |
2 files changed, 123 insertions, 0 deletions
diff --git a/include/opcode/riscv-opc.h b/include/opcode/riscv-opc.h index f0e1d99..9ef9c6f 100644 --- a/include/opcode/riscv-opc.h +++ b/include/opcode/riscv-opc.h @@ -2364,6 +2364,87 @@ #define MASK_C_NTL_S1 0xffff #define MATCH_C_NTL_ALL 0x9016 #define MASK_C_NTL_ALL 0xffff +/* Zimop instructions. */ +#define MATCH_MOP_R_0 0x81c04073 +#define MASK_MOP_R_0 0xfff0707f +#define MATCH_MOP_R_1 0x81d04073 +#define MASK_MOP_R_1 0xfff0707f +#define MATCH_MOP_R_2 0x81e04073 +#define MASK_MOP_R_2 0xfff0707f +#define MATCH_MOP_R_3 0x81f04073 +#define MASK_MOP_R_3 0xfff0707f +#define MATCH_MOP_R_4 0x85c04073 +#define MASK_MOP_R_4 0xfff0707f +#define MATCH_MOP_R_5 0x85d04073 +#define MASK_MOP_R_5 0xfff0707f +#define MATCH_MOP_R_6 0x85e04073 +#define MASK_MOP_R_6 0xfff0707f +#define MATCH_MOP_R_7 0x85f04073 +#define MASK_MOP_R_7 0xfff0707f +#define MATCH_MOP_R_8 0x89c04073 +#define MASK_MOP_R_8 0xfff0707f +#define MATCH_MOP_R_9 0x89d04073 +#define MASK_MOP_R_9 0xfff0707f +#define MATCH_MOP_R_10 0x89e04073 +#define MASK_MOP_R_10 0xfff0707f +#define MATCH_MOP_R_11 0x89f04073 +#define MASK_MOP_R_11 0xfff0707f +#define MATCH_MOP_R_12 0x8dc04073 +#define MASK_MOP_R_12 0xfff0707f +#define MATCH_MOP_R_13 0x8dd04073 +#define MASK_MOP_R_13 0xfff0707f +#define MATCH_MOP_R_14 0x8de04073 +#define MASK_MOP_R_14 0xfff0707f +#define MATCH_MOP_R_15 0x8df04073 +#define MASK_MOP_R_15 0xfff0707f +#define MATCH_MOP_R_16 0xc1c04073 +#define MASK_MOP_R_16 0xfff0707f +#define MATCH_MOP_R_17 0xc1d04073 +#define MASK_MOP_R_17 0xfff0707f +#define MATCH_MOP_R_18 0xc1e04073 +#define MASK_MOP_R_18 0xfff0707f +#define MATCH_MOP_R_19 0xc1f04073 +#define MASK_MOP_R_19 0xfff0707f +#define MATCH_MOP_R_20 0xc5c04073 +#define MASK_MOP_R_20 0xfff0707f +#define MATCH_MOP_R_21 0xc5d04073 +#define MASK_MOP_R_21 0xfff0707f +#define MATCH_MOP_R_22 0xc5e04073 +#define MASK_MOP_R_22 0xfff0707f +#define MATCH_MOP_R_23 0xc5f04073 +#define MASK_MOP_R_23 0xfff0707f +#define MATCH_MOP_R_24 0xc9c04073 +#define MASK_MOP_R_24 0xfff0707f +#define MATCH_MOP_R_25 0xc9d04073 +#define MASK_MOP_R_25 0xfff0707f +#define MATCH_MOP_R_26 0xc9e04073 +#define MASK_MOP_R_26 0xfff0707f +#define MATCH_MOP_R_27 0xc9f04073 +#define MASK_MOP_R_27 0xfff0707f +#define MATCH_MOP_R_28 0xcdc04073 +#define MASK_MOP_R_28 0xfff0707f +#define MATCH_MOP_R_29 0xcdd04073 +#define MASK_MOP_R_29 0xfff0707f +#define MATCH_MOP_R_30 0xcde04073 +#define MASK_MOP_R_30 0xfff0707f +#define MATCH_MOP_R_31 0xcdf04073 +#define MASK_MOP_R_31 0xfff0707f +#define MATCH_MOP_RR_0 0x82004073 +#define MASK_MOP_RR_0 0xfe00707f +#define MATCH_MOP_RR_1 0x86004073 +#define MASK_MOP_RR_1 0xfe00707f +#define MATCH_MOP_RR_2 0x8a004073 +#define MASK_MOP_RR_2 0xfe00707f +#define MATCH_MOP_RR_3 0x8e004073 +#define MASK_MOP_RR_3 0xfe00707f +#define MATCH_MOP_RR_4 0xc2004073 +#define MASK_MOP_RR_4 0xfe00707f +#define MATCH_MOP_RR_5 0xc6004073 +#define MASK_MOP_RR_5 0xfe00707f +#define MATCH_MOP_RR_6 0xca004073 +#define MASK_MOP_RR_6 0xfe00707f +#define MATCH_MOP_RR_7 0xce004073 +#define MASK_MOP_RR_7 0xfe00707f /* Zacas instructions. */ #define MATCH_AMOCAS_W 0x2800202f #define MASK_AMOCAS_W 0xf800707f @@ -4014,6 +4095,47 @@ DECLARE_INSN(c_ntl_p1, MATCH_C_NTL_P1, MASK_C_NTL_P1) DECLARE_INSN(c_ntl_pall, MATCH_C_NTL_PALL, MASK_C_NTL_PALL) DECLARE_INSN(c_ntl_s1, MATCH_C_NTL_S1, MASK_C_NTL_S1) DECLARE_INSN(c_ntl_all, MATCH_C_NTL_ALL, MASK_C_NTL_ALL) +/* Zimop instructions. */ +DECLARE_INSN(MOP_R_0, MATCH_MOP_R_0, MASK_MOP_R_0) +DECLARE_INSN(MOP_R_1, MATCH_MOP_R_1, MASK_MOP_R_1) +DECLARE_INSN(MOP_R_2, MATCH_MOP_R_2, MASK_MOP_R_2) +DECLARE_INSN(MOP_R_3, MATCH_MOP_R_3, MASK_MOP_R_3) +DECLARE_INSN(MOP_R_4, MATCH_MOP_R_4, MASK_MOP_R_4) +DECLARE_INSN(MOP_R_5, MATCH_MOP_R_5, MASK_MOP_R_5) +DECLARE_INSN(MOP_R_6, MATCH_MOP_R_6, MASK_MOP_R_6) +DECLARE_INSN(MOP_R_7, MATCH_MOP_R_7, MASK_MOP_R_7) +DECLARE_INSN(MOP_R_8, MATCH_MOP_R_8, MASK_MOP_R_8) +DECLARE_INSN(MOP_R_9, MATCH_MOP_R_9, MASK_MOP_R_9) +DECLARE_INSN(MOP_R_10, MATCH_MOP_R_10, MASK_MOP_R_10) +DECLARE_INSN(MOP_R_11, MATCH_MOP_R_11, MASK_MOP_R_11) +DECLARE_INSN(MOP_R_12, MATCH_MOP_R_12, MASK_MOP_R_12) +DECLARE_INSN(MOP_R_13, MATCH_MOP_R_13, MASK_MOP_R_13) +DECLARE_INSN(MOP_R_14, MATCH_MOP_R_14, MASK_MOP_R_14) +DECLARE_INSN(MOP_R_15, MATCH_MOP_R_15, MASK_MOP_R_15) +DECLARE_INSN(MOP_R_16, MATCH_MOP_R_16, MASK_MOP_R_16) +DECLARE_INSN(MOP_R_17, MATCH_MOP_R_17, MASK_MOP_R_17) +DECLARE_INSN(MOP_R_18, MATCH_MOP_R_18, MASK_MOP_R_18) +DECLARE_INSN(MOP_R_19, MATCH_MOP_R_19, MASK_MOP_R_19) +DECLARE_INSN(MOP_R_20, MATCH_MOP_R_20, MASK_MOP_R_20) +DECLARE_INSN(MOP_R_21, MATCH_MOP_R_21, MASK_MOP_R_21) +DECLARE_INSN(MOP_R_22, MATCH_MOP_R_22, MASK_MOP_R_22) +DECLARE_INSN(MOP_R_23, MATCH_MOP_R_23, MASK_MOP_R_23) +DECLARE_INSN(MOP_R_24, MATCH_MOP_R_24, MASK_MOP_R_24) +DECLARE_INSN(MOP_R_25, MATCH_MOP_R_25, MASK_MOP_R_25) +DECLARE_INSN(MOP_R_26, MATCH_MOP_R_26, MASK_MOP_R_26) +DECLARE_INSN(MOP_R_27, MATCH_MOP_R_27, MASK_MOP_R_27) +DECLARE_INSN(MOP_R_28, MATCH_MOP_R_28, MASK_MOP_R_28) +DECLARE_INSN(MOP_R_29, MATCH_MOP_R_29, MASK_MOP_R_29) +DECLARE_INSN(MOP_R_30, MATCH_MOP_R_30, MASK_MOP_R_30) +DECLARE_INSN(MOP_R_31, MATCH_MOP_R_31, MASK_MOP_R_31) +DECLARE_INSN(MOP_RR_0, MATCH_MOP_RR_0, MASK_MOP_RR_0) +DECLARE_INSN(MOP_RR_1, MATCH_MOP_RR_1, MASK_MOP_RR_1) +DECLARE_INSN(MOP_RR_2, MATCH_MOP_RR_2, MASK_MOP_RR_2) +DECLARE_INSN(MOP_RR_3, MATCH_MOP_RR_3, MASK_MOP_RR_3) +DECLARE_INSN(MOP_RR_4, MATCH_MOP_RR_4, MASK_MOP_RR_4) +DECLARE_INSN(MOP_RR_5, MATCH_MOP_RR_5, MASK_MOP_RR_5) +DECLARE_INSN(MOP_RR_6, MATCH_MOP_RR_6, MASK_MOP_RR_6) +DECLARE_INSN(MOP_RR_7, MATCH_MOP_RR_7, MASK_MOP_RR_7) /* Zacas instructions. */ DECLARE_INSN(amocas_w, MATCH_AMOCAS_W, MASK_AMOCAS_W) DECLARE_INSN(amocas_d, MATCH_AMOCAS_D, MASK_AMOCAS_D) diff --git a/include/opcode/riscv.h b/include/opcode/riscv.h index fedd478..6793d99 100644 --- a/include/opcode/riscv.h +++ b/include/opcode/riscv.h @@ -437,6 +437,7 @@ enum riscv_insn_class INSN_CLASS_ZIHINTNTL, INSN_CLASS_ZIHINTNTL_AND_C, INSN_CLASS_ZIHINTPAUSE, + INSN_CLASS_ZIMOP, INSN_CLASS_ZMMUL, INSN_CLASS_ZAAMO, INSN_CLASS_ZALRSC, |