Compare commits

...

4 Commits

Author SHA1 Message Date
Marco Costalba bc0871acbc Stockfish 1.6.1
Workaround a gcc optimization bug.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2009-12-26 19:39:22 +01:00
Marco Costalba 2643f1552f Workaround optimization bug in gcc
Unfortunatly we need to slow down to -O1 to be sure
it works always.

Note that sometime it works also with -O2 or even -O3,
but user has to try himself.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2009-12-26 19:39:13 +01:00
Marco Costalba ba07b95ee0 Fix description of Score enum
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2009-12-26 19:39:04 +01:00
Marco Costalba ef58551a2d Fix a typo in ReducedStateInfo
It happened to work by accident because Score and
Value are both integer.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2009-12-26 19:38:53 +01:00
4 changed files with 12 additions and 8 deletions
+4 -1
View File
@@ -25,8 +25,11 @@ EXE = stockfish
### ========================================================================== ### ==========================================================================
### Compiler speed switches for both GCC and ICC. These settings are generally ### Compiler speed switches for both GCC and ICC. These settings are generally
### fast on a broad range of systems, but may be changed experimentally ### fast on a broad range of systems, but may be changed experimentally
###
### NOTE: Some versions of gcc miscompile value.h with -O2 or -O3, this is the
### safe setup, try changing to -O3 or -O2 and verify it works for you.
### ========================================================================== ### ==========================================================================
GCCFLAGS = -O3 -msse GCCFLAGS = -O1 -msse
ICCFLAGS = -fast -msse ICCFLAGS = -fast -msse
ICCFLAGS-OSX = -fast -mdynamic-no-pic ICCFLAGS-OSX = -fast -mdynamic-no-pic
+1 -1
View File
@@ -50,7 +50,7 @@ using namespace std;
/// Version number. If this is left empty, the current date (in the format /// Version number. If this is left empty, the current date (in the format
/// YYMMDD) is used as a version number. /// YYMMDD) is used as a version number.
static const string EngineVersion = "1.6"; static const string EngineVersion = "1.6.1";
static const string AppName = "Stockfish"; static const string AppName = "Stockfish";
static const string AppTag = ""; static const string AppTag = "";
+4 -4
View File
@@ -671,7 +671,7 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI
Key pawnKey, materialKey; Key pawnKey, materialKey;
int castleRights, rule50, pliesFromNull; int castleRights, rule50, pliesFromNull;
Square epSquare; Square epSquare;
Value value; Score value;
Value npMaterial[2]; Value npMaterial[2];
}; };
@@ -969,7 +969,7 @@ void Position::do_castle_move(Move m) {
set_bit(&(byColorBB[us]), rto); set_bit(&(byColorBB[us]), rto);
set_bit(&(byTypeBB[ROOK]), rto); set_bit(&(byTypeBB[ROOK]), rto);
set_bit(&(byTypeBB[0]), rto); // HACK: byTypeBB[0] == occupied squares set_bit(&(byTypeBB[0]), rto); // HACK: byTypeBB[0] == occupied squares
// Update board array // Update board array
Piece king = piece_of_color_and_type(us, KING); Piece king = piece_of_color_and_type(us, KING);
Piece rook = piece_of_color_and_type(us, ROOK); Piece rook = piece_of_color_and_type(us, ROOK);
@@ -1154,7 +1154,7 @@ void Position::undo_castle_move(Move m) {
assert(piece_on(kto) == piece_of_color_and_type(us, KING)); assert(piece_on(kto) == piece_of_color_and_type(us, KING));
assert(piece_on(rto) == piece_of_color_and_type(us, ROOK)); assert(piece_on(rto) == piece_of_color_and_type(us, ROOK));
// Remove pieces from destination squares: // Remove pieces from destination squares:
clear_bit(&(byColorBB[us]), kto); clear_bit(&(byColorBB[us]), kto);
clear_bit(&(byTypeBB[KING]), kto); clear_bit(&(byTypeBB[KING]), kto);
@@ -1162,7 +1162,7 @@ void Position::undo_castle_move(Move m) {
clear_bit(&(byColorBB[us]), rto); clear_bit(&(byColorBB[us]), rto);
clear_bit(&(byTypeBB[ROOK]), rto); clear_bit(&(byTypeBB[ROOK]), rto);
clear_bit(&(byTypeBB[0]), rto); // HACK: byTypeBB[0] == occupied squares clear_bit(&(byTypeBB[0]), rto); // HACK: byTypeBB[0] == occupied squares
// Put pieces on source squares: // Put pieces on source squares:
set_bit(&(byColorBB[us]), kfrom); set_bit(&(byColorBB[us]), kfrom);
set_bit(&(byTypeBB[KING]), kfrom); set_bit(&(byTypeBB[KING]), kfrom);
+3 -2
View File
@@ -52,8 +52,9 @@ enum Value {
}; };
/// Score struct keeps a midgame and an endgame value in a single /// Score enum keeps a midgame and an endgame value in a single
/// ScoreValue 64 bit union. /// integer (enum), first LSB 16 bits are used to store endgame
/// value, while upper bits are used for midgame value.
enum Score {}; enum Score {};