Skip to content

Commit

Permalink
Add 32-bit x86 fallback for popcnt
Browse files Browse the repository at this point in the history
  • Loading branch information
solidpixel committed May 19, 2024
1 parent 7f4ad9c commit 1995186
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/astcenc_vecmathlib_sse_4.h
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ ASTCENC_SIMD_INLINE vfloat4 dot3(vfloat4 a, vfloat4 b)
*/
ASTCENC_SIMD_INLINE int popcount(uint64_t v)
{
#if !defined(__x86_64__)
#if !defined(__x86_64__) && !defined(_M_AMD64)
return static_cast<int>(__builtin_popcountll(v));
#else
return static_cast<int>(_mm_popcnt_u64(v));
Expand Down

0 comments on commit 1995186

Please sign in to comment.