mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-21 08:30:35 +08:00
hwint.c: Fix loop range.
2012-07-17 Tom de Vries <tom@codesourcery.com> * hwint.c: Fix loop range. From-SVN: r189577
This commit is contained in:
parent
440b6d590a
commit
7cb151c045
@ -1,3 +1,7 @@
|
||||
2012-07-17 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
* hwint.c: Fix loop range.
|
||||
|
||||
2012-07-17 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
* double-int.h (double_int_popcount): New inline function.
|
||||
|
@ -113,8 +113,9 @@ int
|
||||
popcount_hwi (unsigned HOST_WIDE_INT x)
|
||||
{
|
||||
int i, ret = 0;
|
||||
size_t bits = sizeof (x) * CHAR_BIT;
|
||||
|
||||
for (i = 0; i < sizeof (x); i += 1)
|
||||
for (i = 0; i < bits; i += 1)
|
||||
{
|
||||
ret += x & 1;
|
||||
x >>= 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user