genautomata.c (reserv_sets_hash_value): Use shift equal to 3/4 of size of unsigned.
2002-05-23 Vladimir Makarov <vmakarov@redhat.com> * genautomata.c (reserv_sets_hash_value): Use shift equal to 3/4 of size of unsigned. From-SVN: r53813
This commit is contained in:
parent
f996902d09
commit
b326b2c169
@ -1,3 +1,8 @@
|
||||
2002-05-23 Vladimir Makarov <vmakarov@redhat.com>
|
||||
|
||||
* genautomata.c (reserv_sets_hash_value): Use shift equal to 3/4
|
||||
of size of unsigned.
|
||||
|
||||
2002-05-23 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* configure.in (HAVE_AS_TLS): New test.
|
||||
|
@ -3413,10 +3413,10 @@ reserv_sets_hash_value (reservs)
|
||||
if (sizeof (set_el_t) <= sizeof (unsigned))
|
||||
return hash_value;
|
||||
result = 0;
|
||||
for (i = sizeof (set_el_t); i > 0; i -= sizeof (unsigned))
|
||||
for (i = sizeof (set_el_t); i > 0; i -= sizeof (unsigned) - 1)
|
||||
{
|
||||
result += (unsigned) hash_value;
|
||||
hash_value >>= sizeof (unsigned) * CHAR_BIT;
|
||||
hash_value >>= (sizeof (unsigned) - 1) * CHAR_BIT;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user