[binutils-gdb] aarch64: Drop "" from hint option hash table
Alice Carlotti via Binutils-cvs <[email protected]> Fri, 10 Jul 2026 15:17:59 +0000 (GMT)
| Newsgroups | gmane.comp.gnu.binutils.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ef0f32623b985f80b339513fca4fb8be10cef376 commit ef0f32623b985f80b339513fca4fb8be10cef376 Author: Alice Carlotti <[email protected]> Date: Wed Feb 18 14:25:58 2026 +0000 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: --- gas/config/tc-aarch64.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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++)