Refactor BitCount
POPCNT intrinsics cannot be used without hardware support, so a CPUID
check and polyfills are required for some CPUs when using MSVC to
avoid runtime failure.
Other changes include:
- Clang: use builtins on all platforms to provide exact intent to the
compiler;
- MSVC on ARM: use dedicated intrinsics;
- x86/x64 fallback is now branchless and works in constant time.
Bug: angleproject:4462
Change-Id: I00fcabda1c842677d8cb4bfd280d932d0d10c0a5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2102811Reviewed-by:
Jamie Madill <jmadill@chromium.org>
Reviewed-by:
Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Showing
Please
register
or
sign in
to comment