From: Alice Carlotti Date: Wed, 18 Feb 2026 14:25:58 +0000 (+0000) Subject: aarch64: Drop "" from hint option hash table X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ef0f32623b985f80b339513fca4fb8be10cef376;p=thirdparty%2Fbinutils-gdb.git aarch64: Drop "" from hint option hash table An empty string is the only option where the upper and lower case forms are identical, so this allows the upper case insertion logic to be simplified as well. --- diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c index 6d412651354..373b97b1534 100644 --- a/gas/config/tc-aarch64.c +++ b/gas/config/tc-aarch64.c @@ -10773,15 +10773,15 @@ md_begin (void) for (i = 0; aarch64_hint_options[i].name != NULL; i++) { const char* name = aarch64_hint_options[i].name; - const char* upper_name = get_upper_str(name); - + /* Empty strings represent an absent optional operand, so won't be looked + up in the hash table. */ + if (*name == '\0') + continue; checked_hash_insert (aarch64_hint_opt_hsh, name, aarch64_hint_options + i); - - /* Also hash the name in the upper case if not the same. */ - if (strcmp (name, upper_name) != 0) - checked_hash_insert (aarch64_hint_opt_hsh, upper_name, - aarch64_hint_options + i); + /* Also hash the name in the upper case. */ + checked_hash_insert (aarch64_hint_opt_hsh, get_upper_str (name), + aarch64_hint_options + i); } for (i = 0; aarch64_sys_ins_gic[i].name != NULL; i++)