Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use intrinsics only for LSB/MSB #1479

Closed
wants to merge 1 commit into from
Closed

Use intrinsics only for LSB/MSB #1479

wants to merge 1 commit into from

Conversation

lucasart
Copy link

@lucasart lucasart commented Mar 11, 2018

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.

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

No functional change.

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.

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

No functional change.
@mcostalba
Copy link

Makefile should be updated too for consistency

@snicolet
Copy link
Member

Makefile should be updated too for consistency

What do you mean? For the ARM case?

@lucasart
Copy link
Author

lucasart commented Mar 12, 2018

@mcostalba: NO_BSF is not controlled by the Makefile. It's controlled by the compiler: NO_BSF = _MSC_VER + !_WIN64.

@snicolet: There is no impact in ARM case. That's because the compiler is GCC or Clang, hence defined __GNUC__.

snicolet pushed a commit that referenced this pull request Mar 14, 2018
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: #1447
and:          #1479

No functional change.
@snicolet
Copy link
Member

Merged via edf4c07.
Thanks !

@snicolet snicolet closed this Mar 14, 2018
goodkov pushed a commit to goodkov/Stockfish that referenced this pull request Jul 21, 2018
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: official-stockfish#1447
and:          official-stockfish#1479

No functional change.
@niklasf niklasf mentioned this pull request Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants