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:
Vladimir Makarov 2002-05-23 21:58:17 +00:00 committed by Vladimir Makarov
parent f996902d09
commit b326b2c169
2 changed files with 7 additions and 2 deletions

View File

@ -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.

View File

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