diff options
author | Xiao Zeng <zengxiao@eswincomputing.com> | 2024-06-12 09:28:17 +0800 |
---|---|---|
committer | Nelson Chu <nelson@rivosinc.com> | 2024-08-07 16:09:08 +0800 |
commit | 305fe5ed3fae8eb30be9e94bdc66998fe734657b (patch) | |
tree | d811c1878408d4eb71c3c51480abc141fa38ef00 /gas | |
parent | 6c8c08721c263d7fd639c5dad8e7778883bcaa53 (diff) | |
download | gdb-305fe5ed3fae8eb30be9e94bdc66998fe734657b.zip gdb-305fe5ed3fae8eb30be9e94bdc66998fe734657b.tar.gz gdb-305fe5ed3fae8eb30be9e94bdc66998fe734657b.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 'gas')
-rw-r--r-- | gas/NEWS | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/march-help.l | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/zimop.d | 48 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/zimop.s | 43 |
4 files changed, 94 insertions, 0 deletions
@@ -46,6 +46,8 @@ Changes in 2.43: * Add support for RISC-V Zcmp extension with version 1.0. +* Add support for RISC-V Zimop extension with version 1.0. + * Add support for RISC-V Zfbfmin extension with version 1.0. * Add support for RISC-V Zvfbfmin extension with version 1.0. diff --git a/gas/testsuite/gas/riscv/march-help.l b/gas/testsuite/gas/riscv/march-help.l index 97521c7..cb8590a 100644 --- a/gas/testsuite/gas/riscv/march-help.l +++ b/gas/testsuite/gas/riscv/march-help.l @@ -25,6 +25,7 @@ All available -march extensions for RISC-V: zihintntl 1.0 zihintpause 2.0 zihpm 2.0 + zimop 1.0 zmmul 1.0 za64rs 1.0 za128rs 1.0 diff --git a/gas/testsuite/gas/riscv/zimop.d b/gas/testsuite/gas/riscv/zimop.d new file mode 100644 index 0000000..becb72c --- /dev/null +++ b/gas/testsuite/gas/riscv/zimop.d @@ -0,0 +1,48 @@ +#as: -march=rv64i_zimop +#objdump: -d + +.*:[ ]+file format .* + +Disassembly of section .text: + +0+000 <target>: +[ ]+[0-9a-f]+:[ ]+81c5c573[ ]+mop.r.0[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+81d5c573[ ]+mop.r.1[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+81e5c573[ ]+mop.r.2[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+81f5c573[ ]+mop.r.3[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+85c5c573[ ]+mop.r.4[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+85d5c573[ ]+mop.r.5[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+85e5c573[ ]+mop.r.6[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+85f5c573[ ]+mop.r.7[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+89c5c573[ ]+mop.r.8[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+89d5c573[ ]+mop.r.9[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+89e5c573[ ]+mop.r.10[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+89f5c573[ ]+mop.r.11[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+8dc5c573[ ]+mop.r.12[ ]+a0,a1 +[ ]+[0-9a-f]+:[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9a-f]+:[ ]+8ac5c573[ ]+mop.rr.2[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+8ec5c573[ ]+mop.rr.3[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+c2c5c573[ ]+mop.rr.4[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+c6c5c573[ ]+mop.rr.5[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+cac5c573[ ]+mop.rr.6[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+cec5c573[ ]+mop.rr.7[ ]+a0,a1,a2 diff --git a/gas/testsuite/gas/riscv/zimop.s b/gas/testsuite/gas/riscv/zimop.s new file mode 100644 index 0000000..d244c1f --- /dev/null +++ b/gas/testsuite/gas/riscv/zimop.s @@ -0,0 +1,43 @@ +target: + # mop.r.n + mop.r.0 a0, a1 + mop.r.1 a0, a1 + mop.r.2 a0, a1 + mop.r.3 a0, a1 + mop.r.4 a0, a1 + mop.r.5 a0, a1 + mop.r.6 a0, a1 + mop.r.7 a0, a1 + mop.r.8 a0, a1 + mop.r.9 a0, a1 + mop.r.10 a0, a1 + mop.r.11 a0, a1 + mop.r.12 a0, a1 + mop.r.13 a0, a1 + mop.r.14 a0, a1 + mop.r.15 a0, a1 + mop.r.16 a0, a1 + mop.r.17 a0, a1 + mop.r.18 a0, a1 + mop.r.19 a0, a1 + mop.r.20 a0, a1 + mop.r.21 a0, a1 + mop.r.22 a0, a1 + mop.r.23 a0, a1 + mop.r.24 a0, a1 + mop.r.25 a0, a1 + mop.r.26 a0, a1 + mop.r.27 a0, a1 + mop.r.28 a0, a1 + mop.r.29 a0, a1 + mop.r.30 a0, a1 + mop.r.31 a0, a1 + # mop.rr.n + mop.rr.0 a0, a1, a2 + mop.rr.1 a0, a1, a2 + mop.rr.2 a0, a1, a2 + mop.rr.3 a0, a1, a2 + mop.rr.4 a0, a1, a2 + mop.rr.5 a0, a1, a2 + mop.rr.6 a0, a1, a2 + mop.rr.7 a0, a1, a2 |