1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-05-01 01:03:09 +00:00

Use compiler intrinsic instead of assembly for popcnt

No functional change.
This commit is contained in:
lucasart 2014-07-01 20:46:16 +08:00
parent 24ba204931
commit a69f1d7c20
2 changed files with 2 additions and 3 deletions

View file

@ -285,7 +285,7 @@ endif
### 3.9 popcnt ### 3.9 popcnt
ifeq ($(popcnt),yes) ifeq ($(popcnt),yes)
CXXFLAGS += -msse3 -DUSE_POPCNT CXXFLAGS += -msse4.2 -DUSE_POPCNT
endif endif
### 3.10 pext ### 3.10 pext

View file

@ -96,8 +96,7 @@ inline int popcount<CNT_HW_POPCNT>(Bitboard b) {
#else #else
__asm__("popcnt %1, %0" : "=r" (b) : "r" (b)); return __builtin_popcountll(b);
return b;
#endif #endif
} }