diff options
| author | Scott Gasch <[email protected]> | 2026-10-25 10:39:58 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2026-10-25 10:39:58 -0700 |
| commit | f97b2710981e936cfb500ad0cdf1ceab233efad8 (patch) | |
| tree | 0004275d9dae8f7df4b5f86f3b750d80bc3f4a52 /src/GNUmakefile | |
| parent | 3927a4cac6ec254a8e34a5e864300f75c3efc9f3 (diff) | |
Make bitboard move generation unconditional; delete the mailbox fallback
All GENERATE_*_BITBOARD/EXPOSESCHECK_BITBOARD/ISATTACKED_BITBOARD/
UNBLOCKED_BITBOARD flags were already default-on (ifndef
DISABLE_BITBOARD_MOVEGEN); this removes that opt-out entirely (GNUmakefile)
and deletes the mailbox-era code the flags used to toggle between, since
there's no longer a build configuration that still needs it:
- generate.c: the mailbox per-piece generators and escape-generators
(GenerateKnight/GenerateWhiteKnight/GenerateBishop/GenerateRook/
GenerateQueen/GenerateBlackKing/GenerateWhiteKing/GenerateWhitePawn/
GenerateBlackPawn and their SaveMe* escape-generator counterparts),
_FindUnblockedSquares and its DEBUG-build cross-check inside
_FindUnblockedSquaresBB, and the dispatch-table #if/#else pairs that
chose between mailbox and bitboard functions (now unconditionally
bitboard). WouldGiveCheck simplified to its UNBLOCKED_BITBOARD-only
body. g_iBDeltas/g_iRDeltas (orphaned once their only consumers were
deleted) removed; g_iNDeltas (still used by data.c's InitMagic) moved
there, next to its real consumer.
- movesup.c: mailbox FasterExposesCheck/ExposesCheck/ExposesCheckEp/
IsAttacked/InCheck deleted; chess.h's three-way macro choice
simplified to a direct #define onto the BB versions (ExposesCheckBB/
IsAttackedBB/etc. are simply "the" implementation now).
- testsee.c/testgenerate.c: deleted the mailbox-vs-BB comparison/speed
harnesses that only existed to validate code just removed
(TestIsAttackedBB, TestGenerateKnightSpeed/KingSpeed/RookSpeed/
BishopSpeed/QueenSpeed, TestFindUnblockedSquaresSpeed's mailbox arm).
TestGetAttacks and the _GenerateAllMoves-vs-_GenerateAllMovesBB
dispatch-overhead benchmark are unaffected -- GetAttacks' mailbox/asm
predecessors were already retired independently, and that pair
compares two still-live BB-only dispatch strategies, not mailbox vs
BB.
Verified: clean release build and a clean DEBUG=1 TEST=1 self-test run
(move generation, perft-style legal-move checks, SAN/ICS parsing,
search smoke test) with no assertion failures.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Diffstat (limited to 'src/GNUmakefile')
| -rw-r--r-- | src/GNUmakefile | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/GNUmakefile b/src/GNUmakefile index 26c7b94..667495e 100644 --- a/src/GNUmakefile +++ b/src/GNUmakefile @@ -144,18 +144,18 @@ ifdef CROUTINES PROFILE += -DCROUTINES endif -ifdef GETATTACKS_BITBOARD - PROFILE += -DGETATTACKS_BITBOARD -endif - -ifndef DISABLE_BITBOARD_MOVEGEN - PROFILE += -DGENERATE_KNIGHT_BITBOARD -DGENERATE_KING_BITBOARD \ +# 2026-10-25: bitboard move generation is no longer optional -- this +# project always uses it (the mailbox fallback predates magic +# bitboards and is only still in the source tree as DEBUG/TEST +# cross-check code, see generate.c/chess.h). GETATTACKS_BITBOARD +# (checked nowhere in the source) and the DISABLE_BITBOARD_MOVEGEN +# opt-out are both retired; these defines are simply always on. +PROFILE += -DGENERATE_KNIGHT_BITBOARD -DGENERATE_KING_BITBOARD \ -DGENERATE_ROOK_BITBOARD -DGENERATE_BISHOP_BITBOARD \ -DGENERATE_QUEEN_BITBOARD -DGENERATE_PAWN_BITBOARD \ -DGENERATE_ESCAPES_KING_BITBOARD -DGENERATE_ESCAPES_BLOCK_BITBOARD \ -DEXPOSESCHECK_BITBOARD -DISATTACKED_BITBOARD \ -DUNBLOCKED_BITBOARD -endif ifdef EVERYTHING PROFILE += -DEVAL_DUMP -DEVAL_TIME -DPERF_COUNTERS -DMP -DSMP -DTEST_NULL -DTREEDUMP -fbounds-checking -DMOVE_ORDERING_EVIDENCE_COLLECTION |
