65816-llvm-mos/benchmarks/popcount.c
Scott Duensing f338d93bae Checkpoint
2026-05-02 18:30:15 -05:00

5 lines
102 B
C

int popcount(unsigned long x) {
int n = 0;
while (x) { n += x & 1; x >>= 1; }
return n;
}