Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid __popcnt64 on MSVC Windows 32-bit platform #87

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

frederick-vs-ja
Copy link

@frederick-vs-ja frederick-vs-ja commented Aug 14, 2024

The __popcnt64 intrinsic isn't supported on 32-bit Windows, so __popcnt should be used instead.

See also https://learn.microsoft.com/en-us/cpp/intrinsics/popcnt16-popcnt-popcnt64?view=msvc-170.


IMO, ideally we should use stdc_count_ones (see here and WG14 N3220). But it will take a long long while until C23 will become popular enough.

@frederick-vs-ja

This comment was marked as outdated.

@frederick-vs-ja
Copy link
Author

Gently ping @asg017. Can we merge this?

The `__popcnt64` intrinsic isn't supported on 32-bit Windows, so `__popcnt` should be used instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant