[binutils-gdb] aarch64: Fix use of wrong zero enum value
Alice Carlotti
acarlotti@sourceware.org
Fri May 15 14:08:16 GMT 2026
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9301434dc97967b8a63b11c5fd78d151358280a5
commit 9301434dc97967b8a63b11c5fd78d151358280a5
Author: Alice Carlotti <alice.carlotti@arm.com>
Date: Fri Jan 30 12:04:06 2026 +0000
aarch64: Fix use of wrong zero enum value
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.
Diff:
---
opcodes/aarch64-opc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/opcodes/aarch64-opc.c b/opcodes/aarch64-opc.c
index a50b8fd0fb8..3586a2d9146 100644
--- a/opcodes/aarch64-opc.c
+++ b/opcodes/aarch64-opc.c
@@ -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];
}
More information about the Binutils-cvs
mailing list