[binutils-gdb] aarch64: Add an assert to inherent_reg_qualifier

Alice Carlotti acarlotti@sourceware.org
Fri May 15 14:08:57 GMT 2026


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e71bf6aa5a92ad40a4e0b2980f4c6e2955f86025

commit e71bf6aa5a92ad40a4e0b2980f4c6e2955f86025
Author: Alice Carlotti <alice.carlotti@arm.com>
Date:   Thu Jan 29 12:07:09 2026 +0000

    aarch64: Add an assert to inherent_reg_qualifier
    
    The default case isn't useful and is currently unreachable, so add an
    assert instead.

Diff:
---
 gas/config/tc-aarch64.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index 0ba4493d936..b3b73daca47 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -921,10 +921,7 @@ parse_reg (char **ccp)
   return reg;
 }
 
-/* Return the operand qualifier associated with all uses of REG, or
-   AARCH64_OPND_QLF_NIL if none.  AARCH64_OPND_QLF_NIL means either
-   that qualifiers don't apply to REG or that qualifiers are added
-   using suffixes.  */
+/* Return the operand qualifier associated with all uses of REG.  */
 
 static aarch64_opnd_qualifier_t
 inherent_reg_qualifier (const reg_entry *reg)
@@ -949,7 +946,7 @@ inherent_reg_qualifier (const reg_entry *reg)
       return AARCH64_OPND_QLF_S_B + (reg->type - REG_TYPE_FP_B);
 
     default:
-      return AARCH64_OPND_QLF_NIL;
+      gas_assert (0);
     }
 }


More information about the Binutils-cvs mailing list