From b326b2c1695b5a0e1e5a17702108b3c513595c6f Mon Sep 17 00:00:00 2001 From: Vladimir Makarov Date: Thu, 23 May 2002 21:58:17 +0000 Subject: [PATCH] genautomata.c (reserv_sets_hash_value): Use shift equal to 3/4 of size of unsigned. 2002-05-23 Vladimir Makarov * genautomata.c (reserv_sets_hash_value): Use shift equal to 3/4 of size of unsigned. From-SVN: r53813 --- gcc/ChangeLog | 5 +++++ gcc/genautomata.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6209ff60bde..d3722739b69 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-05-23 Vladimir Makarov + + * genautomata.c (reserv_sets_hash_value): Use shift equal to 3/4 + of size of unsigned. + 2002-05-23 Richard Henderson * configure.in (HAVE_AS_TLS): New test. diff --git a/gcc/genautomata.c b/gcc/genautomata.c index ae69c5299d9..900cfb610c3 100644 --- a/gcc/genautomata.c +++ b/gcc/genautomata.c @@ -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; } -- 2.30.2