]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
aarch64: Remove incorrect disassembly constraint
authorAlice Carlotti <alice.carlotti@arm.com>
Tue, 7 Oct 2025 04:02:11 +0000 (05:02 +0100)
committerAlice Carlotti <alice.carlotti@arm.com>
Fri, 10 Oct 2025 00:14:07 +0000 (01:14 +0100)
A check in print_insn_aarch64_word asserted that part of the encoding
space couldn't contain any valid encodings, and then returned ERR_NYI
("Not Yet Implemented", perhaps?) for these values.  However, some of
the new FEAT_MOP4 instructions will trigger the assert.  The check seems
to be outdated, and is clearly no longer valid, so it can just be
deleted.

Additionally, there are no other assignments of ERR_NYI, so delete all
remaining references to this error type.

include/opcode/aarch64.h
opcodes/aarch64-asm.c
opcodes/aarch64-dis.c

index 2b3c57d51676141c5a9e2e80fbf96cd7d2e23c3d..ad3f419f9146e113cf9d18bbf379183ed37d246a 100644 (file)
@@ -1283,7 +1283,6 @@ enum err_type
   ERR_OK,
   ERR_UND,
   ERR_UNP,
-  ERR_NYI,
   ERR_VFI,
   ERR_NR_ENTRIES
 };
index 21395bb1d0ec2bce21d2a706648d123f049c3f10..0c8f4b36902dc89614c489fe4e07ba6bfe830d46 100644 (file)
@@ -2695,7 +2695,6 @@ aarch64_opcode_encode (const aarch64_opcode *opcode,
        {
        case ERR_UND:
        case ERR_UNP:
-       case ERR_NYI:
          return false;
        default:
          break;
@@ -2711,7 +2710,6 @@ aarch64_opcode_encode (const aarch64_opcode *opcode,
     {
     case ERR_UND:
     case ERR_UNP:
-    case ERR_NYI:
       return false;
     default:
       break;
index 2bde0ca7daafa249e28f499fe37b1383bddcc05a..c9e60a971521f417aa29186f6e852d34f9d973f4 100644 (file)
@@ -4188,7 +4188,6 @@ print_aarch64_insn (bfd_vma pc, const aarch64_inst *inst,
       break;
     case ERR_UND:
     case ERR_UNP:
-    case ERR_NYI:
     default:
       break;
     }
@@ -4207,7 +4206,6 @@ print_insn_aarch64_word (bfd_vma pc,
       [ERR_OK]  = "_",
       [ERR_UND] = "undefined",
       [ERR_UNP] = "unpredictable",
-      [ERR_NYI] = "NYI"
     };
 
   enum err_type ret;
@@ -4229,18 +4227,10 @@ print_insn_aarch64_word (bfd_vma pc,
 
   ret = aarch64_decode_insn (word, &inst, no_aliases, errors);
 
-  if (((word >> 21) & 0x3ff) == 1)
-    {
-      /* RESERVED for ALES.  */
-      assert (ret != ERR_OK);
-      ret = ERR_NYI;
-    }
-
   switch (ret)
     {
     case ERR_UND:
     case ERR_UNP:
-    case ERR_NYI:
       /* Handle undefined instructions.  */
       info->insn_type = dis_noninsn;
       (*info->fprintf_styled_func) (info->stream,