projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e1328b4
)
[runtime] Fix mono_bitset_count () so it works on win64 as well. (#4413)
author
Zoltan Varga
<vargaz@gmail.com>
Wed, 22 Feb 2017 17:47:47 +0000
(12:47 -0500)
committer
GitHub
<noreply@github.com>
Wed, 22 Feb 2017 17:47:47 +0000
(12:47 -0500)
mono/utils/monobitset.c
patch
|
blob
|
history
diff --git
a/mono/utils/monobitset.c
b/mono/utils/monobitset.c
index b86ab331dbf7e2cab2180e69cef51ae5060c10a4..2f6b6c501037c6cd070612896455c227b3f2b9ae 100644
(file)
--- a/
mono/utils/monobitset.c
+++ b/
mono/utils/monobitset.c
@@
-211,10
+211,10
@@
mono_bitset_count (const MonoBitSet *set) {
for (i = 0; i < set->size / BITS_PER_CHUNK; ++i) {
d = set->data [i];
#ifdef __GNUC__
- if (sizeof (gsize) == sizeof (unsigned long))
- count += __builtin_popcountl (d);
- else
+ if (sizeof (gsize) == sizeof (unsigned int))
count += __builtin_popcount (d);
+ else
+ count += __builtin_popcountll (d);
#else
while (d) {
count ++;