]> git.sesse.net Git - stockfish/commit
Use intrinsics only for LSB/MSB
authorlucasart <lucas.braesch@gmail.com>
Sun, 11 Mar 2018 22:56:14 +0000 (06:56 +0800)
committerStéphane Nicolet <cassio@free.fr>
Wed, 14 Mar 2018 00:31:21 +0000 (01:31 +0100)
commitedf4c07d251f1d6c709d47969bfe1452194d9430
treeffdd5175b71b3109c354076dd323350b6f2da0da
parentb605103a34be5bea7815ab3f6d4a21d487d0182b
Use intrinsics only for LSB/MSB

The NO_BSF does not cover any real life use-case today. The only compilers that
can compile SF today, with the current Makefile and no source code changes, are
either GCC compatible (define __GNUC__) or MSVC compatible (define _MSC_VER). So
they all support LSB/MSB intrinsics.

This patch simplifies away the software fall-backs of LSB/MSB that were still
in Stockfish code, but unused in any of the officially supported compilers.

Note the (legacy) MSVC/WIN32 case, where we use a 32-bit BSF/BSR solution, as
64-bit intrinsics aren't available there.

Discussed in: https://github.com/official-stockfish/Stockfish/pull/1447
and:          https://github.com/official-stockfish/Stockfish/pull/1479

No functional change.
src/bitboard.cpp
src/bitboard.h