Skip to content

Commit

Permalink
Revert "Use compiler intrinsic instead of assembly for popcnt"
Browse files Browse the repository at this point in the history
This reverts commit a69f1d7.
  • Loading branch information
glinscott committed Jul 1, 2014
1 parent a69f1d7 commit b9a88da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Makefile
Expand Up @@ -285,7 +285,7 @@ endif

### 3.9 popcnt
ifeq ($(popcnt),yes)
CXXFLAGS += -msse4.2 -DUSE_POPCNT
CXXFLAGS += -msse3 -DUSE_POPCNT
endif

### 3.10 pext
Expand Down
3 changes: 2 additions & 1 deletion src/bitcount.h
Expand Up @@ -96,7 +96,8 @@ inline int popcount<CNT_HW_POPCNT>(Bitboard b) {

#else

return __builtin_popcountll(b);
__asm__("popcnt %1, %0" : "=r" (b) : "r" (b));
return b;

#endif
}
Expand Down

0 comments on commit b9a88da

Please sign in to comment.