1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-05-01 17:19:36 +00:00
Commit graph

169 commits

Author SHA1 Message Date
Marco Costalba
063e2441b1 Retire USE_COMPACT_ROOK_ATTACKS and USE_FOLDED_BITSCAN defines
This greatly simplifies bitboard.cpp that now has only two setups,
respectively for 32 and 64 bits CPU according to IS_64BIT define
that is automatically set but can be tweaked manually in
bitboard.h

No functional change both in 32 and in 64 bits.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2009-07-03 07:52:10 +01:00
Marco Costalba
3376c68f4b Introduce bitcount.h
It will be used for POPCNT intrinsics.

For now no bianry and functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2009-05-21 16:19:20 +02:00
Marco Costalba
3e40bd0648 Introduce do_move_bb() to update bitboards after a move
Avoid a clear_bit() + set_bit() sequence but update bitboards
with only one xor instructions.

This is faster and simplifies the code.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2009-05-21 10:55:23 +02:00
Marco Costalba
5c81602d14 Update copyright year
We are well in 2009 already.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2009-05-07 14:54:40 +02:00
Marco Costalba
74160ac602 Big headers cleanup
No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2009-03-19 12:55:32 +01:00
Marco Costalba
c32904f0a0 Revert previous commit.
Optimization is correct but slightly slower
so it is a pessimization :-)

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2009-02-04 19:40:09 +01:00
Marco Costalba
6cfb661ca5 Yet another count_1s() optimization
No functional change

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2009-01-25 19:29:15 +01:00
Marco Costalba
be43219136 Rever count_1s() optimizations
They are wrong for all ones case.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2009-01-25 18:00:57 +01:00
Marco Costalba
3e6e57231e Rewrite count_1s() to be similar to 64bit counterpart
No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2009-01-11 17:15:18 +01:00
Marco Costalba
14c1fd4d27 Micro optimize count_1s_max_15() for 32 bit system
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2009-01-11 17:05:29 +01:00
Marco Costalba
389dc0e83b Add behind_bb() helper to simplify code logic
No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-10 00:14:24 +01:00
Marco Costalba
aaad48464b Add a see() function that take only destination square
In this case firstlocates the least valuable attacker, if any,
then proceed as usual.

This will be used by next patch.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-10 00:13:59 +01:00
Marco Costalba
74f1efee26 Manual merge 2008-10-26 21:44:58 +01:00
Marco Costalba
af59cb1d63 Refactor Position::pinned_pieces() to use templates
Also better document this interesting function.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-10-24 21:10:04 +02:00
Marco Costalba
279ed7ed48 Quiet a warning on Intel compiler
Plus usual trailing whitespace noise.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-10-20 21:55:43 +02:00
Marco Costalba
5dc2312121 Update copyright info
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-10-20 21:47:20 +02:00
Marco Costalba
d3600c39a7 Update copyright info
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-10-19 20:43:33 +01:00
Marco Costalba
d6618d7325 Add auto configuration for 32/64 bits
Instead of manually adjust defines in bitboard.h
now proper ones are automatically set.

It is anyhow possible to still set them manually
in case of problems.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-09-25 07:51:56 +02:00
Marco Costalba
bb751d6c89 Initial import of Glaurung 2.1 2008-09-01 07:59:13 +02:00