[PATCH 1/1] RISC-V: Make zip/unzip on Zbkb non-aliases
Tsukasa OI
research_trasio@irq.a4lg.com
Fri Jun 3 12:04:40 GMT 2022
zip/unzip are specialized forms of shfli/unshfli instructions
respectively. However, because both shfli and unshfli instructions are
not ratified (in generalized forms), disassembling zip/unzip on
RV32_Zbkb with `-M no-aliases' option makes disassembly dumps with
.4byte (invalid instruction), not zip/unzip.
This commit makes zip/unzip non-aliases until generalized forms of shfli
and unshfli are ratified.
opcodes/ChangeLog:
* riscv-opc.c (riscv_opcodes): Make zip/unzip instructions on
RV32_Zbkb non-aliases to fix a disassembler issue.
---
opcodes/riscv-opc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/opcodes/riscv-opc.c b/opcodes/riscv-opc.c
index 6355f8059f5..05079821fb7 100644
--- a/opcodes/riscv-opc.c
+++ b/opcodes/riscv-opc.c
@@ -942,8 +942,8 @@ const struct riscv_opcode riscv_opcodes[] =
{"cpopw", 64, INSN_CLASS_ZBB, "d,s", MATCH_CPOPW, MASK_CPOPW, match_opcode, 0 },
{"brev8", 32, INSN_CLASS_ZBKB, "d,s", MATCH_GREVI | MATCH_SHAMT_BREV8, MASK_GREVI | MASK_SHAMT, match_opcode, 0 },
{"brev8", 64, INSN_CLASS_ZBKB, "d,s", MATCH_GREVI | MATCH_SHAMT_BREV8, MASK_GREVI | MASK_SHAMT, match_opcode, 0 },
-{"zip", 32, INSN_CLASS_ZBKB, "d,s", MATCH_SHFLI|MATCH_SHAMT_ZIP_32, MASK_SHFLI|MASK_SHAMT, match_opcode, INSN_ALIAS },
-{"unzip", 32, INSN_CLASS_ZBKB, "d,s", MATCH_UNSHFLI|MATCH_SHAMT_ZIP_32, MASK_UNSHFLI|MASK_SHAMT, match_opcode, INSN_ALIAS },
+{"zip", 32, INSN_CLASS_ZBKB, "d,s", MATCH_SHFLI|MATCH_SHAMT_ZIP_32, MASK_SHFLI|MASK_SHAMT, match_opcode, 0 },
+{"unzip", 32, INSN_CLASS_ZBKB, "d,s", MATCH_UNSHFLI|MATCH_SHAMT_ZIP_32, MASK_UNSHFLI|MASK_SHAMT, match_opcode, 0 },
{"pack", 0, INSN_CLASS_ZBKB, "d,s,t", MATCH_PACK, MASK_PACK, match_opcode, 0 },
{"packh", 0, INSN_CLASS_ZBKB, "d,s,t", MATCH_PACKH, MASK_PACKH, match_opcode, 0 },
{"packw", 64, INSN_CLASS_ZBKB, "d,s,t", MATCH_PACKW, MASK_PACKW, match_opcode, 0 },
--
2.34.1
More information about the Binutils
mailing list