diff options
author | Xiao Zeng <zengxiao@eswincomputing.com> | 2024-06-12 09:28:18 +0800 |
---|---|---|
committer | Nelson Chu <nelson@rivosinc.com> | 2024-08-06 13:36:21 +0800 |
commit | 8a3ffa71945816b941d3dea9ebc7013d5be7a1a4 (patch) | |
tree | 336fabde86a60fc125991ace7aa31b0617f23ba9 /include | |
parent | 3ba06284d2cada7a4798f7849da113661aff07dd (diff) | |
download | gdb-8a3ffa71945816b941d3dea9ebc7013d5be7a1a4.zip gdb-8a3ffa71945816b941d3dea9ebc7013d5be7a1a4.tar.gz gdb-8a3ffa71945816b941d3dea9ebc7013d5be7a1a4.tar.bz2 |
RISC-V: Add support for Zcmop extension
This implements the Zcmop (Compressed Zimop) extension, as of version 1.0.
View detailed information in:
<https://github.com/riscv/riscv-isa-manual/blob/main/src/zimop.adoc>
The Zcmop extension requires the Zca extension.
bfd/ChangeLog:
* elfxx-riscv.c (riscv_multi_subset_supports): Handle Zcmop.
(riscv_multi_subset_supports_ext): Ditto.
gas/ChangeLog:
* NEWS: Updated.
* testsuite/gas/riscv/march-help.l: Ditto.
* testsuite/gas/riscv/zcmop.d: New test.
* testsuite/gas/riscv/zcmop.s: New test.
include/ChangeLog:
* opcode/riscv-opc.h (DECLARE_INSN): New declarations for Zcmop.
(MATCH_C_MOP_1, MATCH_C_MOP_3, MATCH_C_MOP_5, MATCH_C_MOP_7,
MATCH_C_MOP_9, MATCH_C_MOP_11, MATCH_C_MOP_13, MATCH_C_MOP_15): Define.
(MASK_C_MOP_1, MASK_C_MOP_3, MASK_C_MOP_5, MASK_C_MOP_7,
MASK_C_MOP_9, MASK_C_MOP_11, MASK_C_MOP_13, MASK_C_MOP_15): Ditto.
* opcode/riscv.h (enum riscv_insn_class): Add INSN_CLASS_ZCMOP.
opcodes/ChangeLog:
* riscv-opc.c: Add Zcmop instructions.
Diffstat (limited to 'include')
-rw-r--r-- | include/opcode/riscv-opc.h | 26 | ||||
-rw-r--r-- | include/opcode/riscv.h | 1 |
2 files changed, 27 insertions, 0 deletions
diff --git a/include/opcode/riscv-opc.h b/include/opcode/riscv-opc.h index 9ef9c6f..22e63ba 100644 --- a/include/opcode/riscv-opc.h +++ b/include/opcode/riscv-opc.h @@ -2275,6 +2275,23 @@ #define MASK_C_NOT 0xfc7f #define MATCH_C_MUL 0x9c41 #define MASK_C_MUL 0xfc63 +/* Zcmop instructions. */ +#define MATCH_C_MOP_1 0x6081 +#define MASK_C_MOP_1 0xffff +#define MATCH_C_MOP_3 0x6181 +#define MASK_C_MOP_3 0xffff +#define MATCH_C_MOP_5 0x6281 +#define MASK_C_MOP_5 0xffff +#define MATCH_C_MOP_7 0x6381 +#define MASK_C_MOP_7 0xffff +#define MATCH_C_MOP_9 0x6481 +#define MASK_C_MOP_9 0xffff +#define MATCH_C_MOP_11 0x6581 +#define MASK_C_MOP_11 0xffff +#define MATCH_C_MOP_13 0x6681 +#define MASK_C_MOP_13 0xffff +#define MATCH_C_MOP_15 0x6781 +#define MASK_C_MOP_15 0xffff /* Zcmp instructions. */ #define MATCH_CM_PUSH 0xb802 #define MASK_CM_PUSH 0xff03 @@ -4213,6 +4230,15 @@ DECLARE_INSN(c_lhu, MATCH_C_LHU, MASK_C_LHU) DECLARE_INSN(c_lh, MATCH_C_LH, MASK_C_LH) DECLARE_INSN(c_sb, MATCH_C_SB, MASK_C_SB) DECLARE_INSN(c_sh, MATCH_C_SH, MASK_C_SH) +/* Zcmop instructions. */ +DECLARE_INSN(c_mop_1, MATCH_C_MOP_1, MASK_C_MOP_1) +DECLARE_INSN(c_mop_3, MATCH_C_MOP_3, MASK_C_MOP_3) +DECLARE_INSN(c_mop_5, MATCH_C_MOP_5, MASK_C_MOP_5) +DECLARE_INSN(c_mop_7, MATCH_C_MOP_7, MASK_C_MOP_7) +DECLARE_INSN(c_mop_9, MATCH_C_MOP_9, MASK_C_MOP_9) +DECLARE_INSN(c_mop_11, MATCH_C_MOP_11, MASK_C_MOP_11) +DECLARE_INSN(c_mop_13, MATCH_C_MOP_13, MASK_C_MOP_13) +DECLARE_INSN(c_mop_15, MATCH_C_MOP_15, MASK_C_MOP_15) /* Zcmp instructions. */ DECLARE_INSN(cm_push, MATCH_CM_PUSH, MASK_CM_PUSH) DECLARE_INSN(cm_pop, MATCH_CM_POP, MASK_CM_POP) diff --git a/include/opcode/riscv.h b/include/opcode/riscv.h index 6793d99..9ccf0ec 100644 --- a/include/opcode/riscv.h +++ b/include/opcode/riscv.h @@ -487,6 +487,7 @@ enum riscv_insn_class INSN_CLASS_ZCB_AND_ZBA, INSN_CLASS_ZCB_AND_ZBB, INSN_CLASS_ZCB_AND_ZMMUL, + INSN_CLASS_ZCMOP, INSN_CLASS_ZCMP, INSN_CLASS_SVINVAL, INSN_CLASS_ZICBOM, |