diff options
author | Zoltan Varga <vargaz@gmail.com> | 2017-02-22 20:47:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-22 20:47:47 +0300 |
commit | 9389d44cbaacbea3062eff6741b7378ca4890818 (patch) | |
tree | 214a8f5a7a682478d4bc923cea911880aa470c6a | |
parent | e1328b4a3665b36f493a136c989afa7260166f82 (diff) |
[runtime] Fix mono_bitset_count () so it works on win64 as well. (#4413)
-rw-r--r-- | mono/utils/monobitset.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mono/utils/monobitset.c b/mono/utils/monobitset.c index b86ab331dbf..2f6b6c50103 100644 --- 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 ++; |