Hi @ll,
the "magic" constants 0x55...55, 0x33...33, 0x0f...0f and 0x01...01 used
in the popcountsi2() and popcountdi2() functions defined in libgcc2.c are
currently generated iterative via the 4 macros POPCOUNTCST, POPCOUNTCST8,
POPCOUNTCST4 and POPCOUNTCST2 from 2 nibbles over 4 and 8 nibbles to
The implementation of the __ashlDI3(), __ashrDI3() and __lshrDI3() functions
is rather bad, it yields bad machine code at least on i386 and AMD64.
Since GCC knows how to shift integers twice the register size these functions
can be written as one-liners.
The implementation of the __bswapsi2() func