RISC-V: Zvkh[a,b]: Remove individual instruction class
authorChristoph Müllner <christoph.muellner@vrull.eu>
Mon, 3 Jul 2023 10:10:47 +0000 (12:10 +0200)
committerNelson Chu <nelson@rivosinc.com>
Mon, 3 Jul 2023 10:17:59 +0000 (18:17 +0800)
Currently we have three instruction classes defined for Zvkh[a,b]:
- INSN_CLASS_ZVKNHA
- INSN_CLASS_ZVKNHB
- INSN_CLASS_ZVKNHA_OR_ZVKNHB

The encodings of all instructions in Zvknh[a,b] are identical.
Therefore, we don't need the individual instruction classes
and can remove them.

This patch also adds the missing support of the combined instruction
class in riscv_multi_subset_supports_ext().

Fixes: 62edb233ef5 ("RISC-V: Add support for the Zvknh[a,b] ISA extensions")
Reported-By: Nelson Chu <nelson@rivosinc.com>
Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
bfd/elfxx-riscv.c
include/opcode/riscv.h

index d6c8e046e3e687876640fb56245f4180bd14dccd..bdfc0ef01f4be4dae28fa987d6bfe49b16ca147b 100644 (file)
@@ -2479,10 +2479,6 @@ riscv_multi_subset_supports (riscv_parse_subset_t *rps,
       return riscv_subset_supports (rps, "zvkg");
     case INSN_CLASS_ZVKNED:
       return riscv_subset_supports (rps, "zvkned");
-    case INSN_CLASS_ZVKNHA:
-      return riscv_subset_supports (rps, "zvknha");
-    case INSN_CLASS_ZVKNHB:
-      return riscv_subset_supports (rps, "zvknhb");
     case INSN_CLASS_ZVKNHA_OR_ZVKNHB:
       return (riscv_subset_supports (rps, "zvknha")
              || riscv_subset_supports (rps, "zvknhb"));
@@ -2686,10 +2682,8 @@ riscv_multi_subset_supports_ext (riscv_parse_subset_t *rps,
       return _("zvkg");
     case INSN_CLASS_ZVKNED:
       return _("zvkned");
-    case INSN_CLASS_ZVKNHA:
-      return _("zvknha");
-    case INSN_CLASS_ZVKNHB:
-      return _("zvknhb");
+    case INSN_CLASS_ZVKNHA_OR_ZVKNHB:
+      return _("zvknha' or `zvknhb");
     case INSN_CLASS_ZVKSED:
       return _("zvksed");
     case INSN_CLASS_ZVKSH:
index d859f44fc9259995752d482368e2fe47f9f13d5c..739d6dafae9db87997055787a04c32c8f02d882a 100644 (file)
@@ -418,8 +418,6 @@ enum riscv_insn_class
   INSN_CLASS_ZVBC,
   INSN_CLASS_ZVKG,
   INSN_CLASS_ZVKNED,
-  INSN_CLASS_ZVKNHA,
-  INSN_CLASS_ZVKNHB,
   INSN_CLASS_ZVKNHA_OR_ZVKNHB,
   INSN_CLASS_ZVKSED,
   INSN_CLASS_ZVKSH,