]> git.sesse.net Git - stockfish/commit
Don't use _pext_u64() directly
authorMarco Costalba <mcostalba@gmail.com>
Tue, 20 Jan 2015 21:17:22 +0000 (22:17 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 20 Jan 2015 21:17:22 +0000 (22:17 +0100)
commitf54c44e6be0deaadefcb428af8d288e75955aa20
tree5af3740363c66a0cc28d0a8d9db9a08d5da6d5d8
parentca3622f8e86746b066f75db449b1e8beac111b6c
Don't use _pext_u64() directly

This intrinsic to call BMI2 PEXT instruction is
defined in immintrin.h. This header should be
included only when USE_PEXT is defined, otherwise
we define _pext_u64 as 0 forcing a nop.

But under some mingw platforms, even if we don't
include the header, immintrin.h gets included
anyhow through an include chain that starts with
STL <algorithm> header. So we end up both defining
_pext_u64 function and at the same time defining
_pext_u64 as 0 leading to a compile error.

The correct solution is of not using _pext_u64 directly.

This patch fixes a compile error with some mingw64
package when compiling with x86-64.

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