summaryrefslogtreecommitdiff
path: root/src/docs/TESTING_PLAN.md
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2026-10-25 11:20:24 -0700
committerScott Gasch <[email protected]>2026-10-25 11:20:41 -0700
commitc1e8cefc7bf0c4017dda24b0486806ce3304a7ae (patch)
treeda5cfe55fe0af85c615db8c68320d53d1f67cf5c /src/docs/TESTING_PLAN.md
parent455accb4cbb1777cb553b6d75136521c6b8d1c01 (diff)
Remove the x86/x64 assembly backend; use compiler intrinsics insteadHEADmaster
x86.asm/x64.asm were already mostly dead weight -- GetAttacks's real asm body was retired 2026-09-06 (section 7 of board_representation/MIGRATION.md), and LockDecrement/ CanUseParallelOpcodes/ParallelCompareUlong/ParallelCompareVector had zero remaining callers (confirmed by grep before deleting anything). What was still real and load-bearing: - CountBits/FirstBit/LastBit: popcount/bsf/bsr CDECL calls. Already had faster, compiler-intrinsic replacements sitting right next to them in chess.h (FastCountBits/FastFirstBit/FastLastBit, via __builtin_popcountll/__builtin_ctzll/__builtin_clzll with -mpopcnt) that per-file #ifndef CROUTINES blocks in board.c/eval.c/generate.c/ probe.c/recogn.c were already redirecting individual call sites to. Promoted that redirect to the plain names unconditionally (#define CountBits FastCountBits etc. in chess.h) and dropped the now-always-true CROUTINES guards in those five files -- CountBits' real asm body was a Kernighan bit-clearing loop (~23 cycles/op per gmake TEST=1's own benchmark), not even O(1), so this is strictly faster as well as removing the toolchain dependency. - LockCompareExchange/LockIncrement: real atomics backing AcquireSpinLock/TryAcquireSpinLock/ReleaseSpinLock (util.c) and the move-pool allocator (gamelist.c). Replaced with static inline wrappers over __sync_val_compare_and_swap/__sync_add_and_fetch -- same CAS/atomic-add semantics as the retired `lock cmpxchg`/ `lock xadd` instructions. Removes the yasm/nasm build dependency entirely: GNUmakefile's NASM/NASMFLAGS variables, the CROUTINES flag, the .asm->.o build rule, and x86.o/x64.o from every OBJS list. x86.asm/x64.asm deleted outright (git history keeps them if ever needed again). The ASM=1 debug mode (-S -fverbose-asm, a C-compiler assembly-listing dump, unrelated to the deleted files despite the similar name) is untouched. Verified: clean build with no yasm/nasm invocation anywhere in the log, a clean DEBUG=1 TEST=1 self-test run, and node-count parity against the previous commit on all three curated suites at sd10 (4,003,856 / 22,308,015 / 26,868,016 on both sides) -- confirms this is a pure substitution with zero behavioral change, not just "doesn't crash." Co-Authored-By: Claude Sonnet 5 <[email protected]>
Diffstat (limited to 'src/docs/TESTING_PLAN.md')
0 files changed, 0 insertions, 0 deletions