]> 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)
committerJoona Kiiski <joona.kiiski@gmail.com>
Sat, 24 Jan 2015 19:38:06 +0000 (19:38 +0000)
commit54b5b528d9ef6c4f14a2000eead9a5c0686f899e
treecde734c49baa977f2d556d418216a5a2248c88b3
parent44643c277007e3902586418541c0c22ff110fde1
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.

Resolves #222
src/bitboard.cpp
src/bitboard.h
src/types.h