From: David Edelsohn Date: Mon, 7 Apr 1997 19:27:12 +0000 (+0000) Subject: * cgen-opc.c (hash_keyword_name): Improve algorithm. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=70bb1aa163ad2e4aa8a85369bf08515ad5044458;p=binutils-gdb.git * cgen-opc.c (hash_keyword_name): Improve algorithm. --- diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index c325a01a0d0..44d48203803 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,5 +1,7 @@ Mon Apr 7 11:45:44 1997 Doug Evans + * cgen-opc.c (hash_keyword_name): Improve algorithm. + * disassemble.c (disassembler): Handle m32r. Fri Apr 4 12:29:38 1997 Doug Evans diff --git a/opcodes/cgen-opc.c b/opcodes/cgen-opc.c index cbe9d5cd46e..cb622c466be 100644 --- a/opcodes/cgen-opc.c +++ b/opcodes/cgen-opc.c @@ -236,7 +236,7 @@ hash_keyword_name (kt, name) unsigned int hash; for (hash = 0; *name; ++name) - hash += *name; + hash = (hash * 97) + (unsigned char) *name; return hash % kt->hash_table_size; }