summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2026-10-25 10:39:58 -0700
committerScott Gasch <[email protected]>2026-10-25 10:39:58 -0700
commitf97b2710981e936cfb500ad0cdf1ceab233efad8 (patch)
tree0004275d9dae8f7df4b5f86f3b750d80bc3f4a52 /src/main.c
parent3927a4cac6ec254a8e34a5e864300f75c3efc9f3 (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/main.c')
-rw-r--r--src/main.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/main.c b/src/main.c
index 0b63bec..2f5428e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -733,18 +733,12 @@ Return value:
TestSan();
TestIcs();
TestGetAttacks();
- TestIsAttackedBB();
TestSeeFastSign();
TestSEENoDefenderFastPath();
TestWhoAttacksSquareMagic();
TestMoveGenerator();
TestLegalMoveGenerator();
TestNnueAccumulator();
- TestGenerateKnightSpeed();
- TestGenerateKingSpeed();
- TestGenerateRookSpeed();
- TestGenerateBishopSpeed();
- TestGenerateQueenSpeed();
TestGenerateAllMovesSpeed();
#if defined(CAPTURES_PROMS_BITBOARD_PATH)
TestCapturesAndPromotionsGenerator();