popcnt: expand comments in popcnt_avx2_amd64.s
Document the AVX2 popcount assembly more thoroughly. Comments only -- no instruction was changed; the build, go vet's asm checker, and the differential tests all still pass. - Header split into an algorithm overview (the Mula/Lemire VPSHUFB nibble-lookup popcount) and a Go-assembler conventions section (operand order, Yn/Xn registers, FP argument layout, NOSPLIT/$0 leaf frames, and why VMOVDQU and VZEROUPPER are used). - lutmask: decode the constant blob -- how the bytes map to nibble popcounts, why the 16-entry table is duplicated per 128-bit lane, and what the 0x0F mask is for. - COUNTBLOCK: line-by-line walkthrough of the eight instructions plus the no-overflow reasoning; SETUP and HSUM expanded similarly. - _popcntSliceAVX2 fully annotated as the canonical template; the And/Or/Xor/Mask variants note they mirror it and differ only in the combine op (including the VPANDN operand-order detail) and explain the +48 return slot. - _hasAVX2: explain why each CPUID/XGETBV check matters.
P
Philipp Klose committed
ca1e20552fb84ec7bfa00cc3a31f16b16a5a495a
Parent: 9381251