You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[DO NOT MERGE]
Until the 'Zimop' extension is frozen/ratified and final version number is
determined, this patch should not be merged upstream. This commit uses
version 0.1 as a placeholder.
This commit adds support for "May Be Operations (MOP)" (Zimop) extension
which adds 32 2-operand MOP instructions and 8 3-operand MOP instructions.
By default, they are practically the same as "li rd, 0". However, if
certain feature is supported (and optionally enabled), it is allowed to
alter architectural state unlike HINT instructions.
This commit is based on the TENTATIVE specification:
<riscv/riscv-cfi#131>
bfd/ChangeLog:
* elfxx-riscv.c (riscv_supported_std_z_ext): Add 'Zimop'.
(riscv_multi_subset_supports): Support new instruction class.
(riscv_multi_subset_supports_ext): Likewise.
gas/ChangeLog:
* testsuite/gas/riscv/zimop.s: New test for 'Zimop'.
* testsuite/gas/riscv/zimop.d: Likewise.
* testsuite/gas/riscv/zimop-noarch.d: New test for architecture
failure.
* testsuite/gas/riscv/zimop-noarch.l: Likewise.
include/ChangeLog:
* opcode/riscv-opc.h (MATCH_MOP_R_0, MASK_MOP_R_0, MATCH_MOP_R_1,
MASK_MOP_R_1, MATCH_MOP_R_2, MASK_MOP_R_2, MATCH_MOP_R_3,
MASK_MOP_R_3, MATCH_MOP_R_4, MASK_MOP_R_4, MATCH_MOP_R_5,
MASK_MOP_R_5, MATCH_MOP_R_6, MASK_MOP_R_6, MATCH_MOP_R_7,
MASK_MOP_R_7, MATCH_MOP_R_8, MASK_MOP_R_8, MATCH_MOP_R_9,
MASK_MOP_R_9, MATCH_MOP_R_10, MASK_MOP_R_10, MATCH_MOP_R_11,
MASK_MOP_R_11, MATCH_MOP_R_12, MASK_MOP_R_12, MATCH_MOP_R_13,
MASK_MOP_R_13, MATCH_MOP_R_14, MASK_MOP_R_14, MATCH_MOP_R_15,
MASK_MOP_R_15, MATCH_MOP_R_16, MASK_MOP_R_16, MATCH_MOP_R_17,
MASK_MOP_R_17, MATCH_MOP_R_18, MASK_MOP_R_18, MATCH_MOP_R_19,
MASK_MOP_R_19, MATCH_MOP_R_20, MASK_MOP_R_20, MATCH_MOP_R_21,
MASK_MOP_R_21, MATCH_MOP_R_22, MASK_MOP_R_22, MATCH_MOP_R_23,
MASK_MOP_R_23, MATCH_MOP_R_24, MASK_MOP_R_24, MATCH_MOP_R_25,
MASK_MOP_R_25, MATCH_MOP_R_26, MASK_MOP_R_26, MATCH_MOP_R_27,
MASK_MOP_R_27, MATCH_MOP_R_28, MASK_MOP_R_28, MATCH_MOP_R_29,
MASK_MOP_R_29, MATCH_MOP_R_30, MASK_MOP_R_30, MATCH_MOP_R_31,
MASK_MOP_R_31, MATCH_MOP_RR_0, MASK_MOP_RR_0, MATCH_MOP_RR_1,
MASK_MOP_RR_1, MATCH_MOP_RR_2, MASK_MOP_RR_2, MATCH_MOP_RR_3,
MASK_MOP_RR_3, MATCH_MOP_RR_4, MASK_MOP_RR_4, MATCH_MOP_RR_5,
MASK_MOP_RR_5, MATCH_MOP_RR_6, MASK_MOP_RR_6, MATCH_MOP_RR_7,
MASK_MOP_RR_7): New.
* opcode/riscv.h (enum riscv_insn_class): Add new instruction
class INSN_CLASS_ZIMOP.
opcodes/ChangeLog:
* riscv-opc.c (riscv_opcodes): Add new "may be" operations from
the 'Zimop' extension near the bottom.
0 commit comments