Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoltan Varga <vargaz@gmail.com>2017-02-22 20:47:47 +0300
committerGitHub <noreply@github.com>2017-02-22 20:47:47 +0300
commit9389d44cbaacbea3062eff6741b7378ca4890818 (patch)
tree214a8f5a7a682478d4bc923cea911880aa470c6a
parente1328b4a3665b36f493a136c989afa7260166f82 (diff)
[runtime] Fix mono_bitset_count () so it works on win64 as well. (#4413)
-rw-r--r--mono/utils/monobitset.c6
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 ++;