[PATCH v2 5/9] aarch64: Remove incorrect disassembly constraint

Alice Carlotti alice.carlotti@arm.com
Thu Oct 9 07:42:17 GMT 2025


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.


diff --git a/include/opcode/aarch64.h b/include/opcode/aarch64.h
index bc5ac363fd85d46b6226c71bbabc8d962c7d3ac8..dd292e3251948d6e7d7f37d591c0d882242a37f0 100644
--- a/include/opcode/aarch64.h
+++ b/include/opcode/aarch64.h
@@ -1280,7 +1280,6 @@ enum err_type
   ERR_OK,
   ERR_UND,
   ERR_UNP,
-  ERR_NYI,
   ERR_VFI,
   ERR_NR_ENTRIES
 };
diff --git a/opcodes/aarch64-asm.c b/opcodes/aarch64-asm.c
index 21395bb1d0ec2bce21d2a706648d123f049c3f10..0c8f4b36902dc89614c489fe4e07ba6bfe830d46 100644
--- a/opcodes/aarch64-asm.c
+++ b/opcodes/aarch64-asm.c
@@ -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;
diff --git a/opcodes/aarch64-dis.c b/opcodes/aarch64-dis.c
index 30efd66a41ad0953aece0f77563e49e4e924e859..d90744880c52bb60b642189baac74b6ba7c52ff9 100644
--- a/opcodes/aarch64-dis.c
+++ b/opcodes/aarch64-dis.c
@@ -4185,7 +4185,6 @@ print_aarch64_insn (bfd_vma pc, const aarch64_inst *inst,
       break;
     case ERR_UND:
     case ERR_UNP:
-    case ERR_NYI:
     default:
       break;
     }
@@ -4204,7 +4203,6 @@ print_insn_aarch64_word (bfd_vma pc,
       [ERR_OK]  = "_",
       [ERR_UND] = "undefined",
       [ERR_UNP] = "unpredictable",
-      [ERR_NYI] = "NYI"
     };
 
   enum err_type ret;
@@ -4226,18 +4224,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,


More information about the Binutils mailing list