]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
aarch64: Fix use of wrong zero enum value
authorAlice Carlotti <alice.carlotti@arm.com>
Fri, 30 Jan 2026 12:04:06 +0000 (12:04 +0000)
committerAlice Carlotti <alice.carlotti@arm.com>
Fri, 15 May 2026 14:07:16 +0000 (15:07 +0100)
aarch64_get_expected_qualifier was incorrectly comparing an
aarch64_opnd_qualifier_t against AARCH64_OPND_NIL instead of
AARCH64_OPND_QLF_NIL (these are the zero values of two different enums).
A previous patch incorrectly addressed the type mismatch by casting the
qualifier to (enum aarch64_opnd).

Fix it properly by removing the cast and updating the comparison to use
AARCH64_OPND_QLF_NIL.

opcodes/aarch64-opc.c

index a50b8fd0fb81396919c26efcbac8fb6e64f39f74..3586a2d9146411cb2324cd379356dd4d2e9ca75a 100644 (file)
@@ -780,9 +780,9 @@ aarch64_get_expected_qualifier (const aarch64_opnd_qualifier_seq_t *qseq_list,
      it can mean no qualifier for the operand, or the qualifer sequence is
      not in use (when all qualifiers in the sequence are NILs), we have to
      handle this special case here.  */
-  if (((enum aarch64_opnd) known_qlf) == AARCH64_OPND_NIL)
+  if (known_qlf == AARCH64_OPND_QLF_NIL)
     {
-      assert (((enum aarch64_opnd) qseq_list[0][known_idx]) == AARCH64_OPND_NIL);
+      assert (qseq_list[0][known_idx] == AARCH64_OPND_QLF_NIL);
       return qseq_list[0][idx];
     }