* cgen-opc.c (hash_keyword_name): Improve algorithm.

This commit is contained in:
David Edelsohn 1997-04-07 19:27:12 +00:00
parent 61e51cd730
commit 70bb1aa163
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,7 @@
Mon Apr 7 11:45:44 1997 Doug Evans <dje@canuck.cygnus.com>
* cgen-opc.c (hash_keyword_name): Improve algorithm.
* disassemble.c (disassembler): Handle m32r.
Fri Apr 4 12:29:38 1997 Doug Evans <dje@canuck.cygnus.com>

View File

@ -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;
}