[klibc] If we have gcc4, use __builtin_clz() to do a binary logarithm

If we have gcc4, we can use __builtin_clz() to do the binary logarithm
necessary to compute __page_shift.  Do foo^31 instead of 32-foo since
that seems to be how gcc is implemented; this means gcc can figure out
how to properly optimize the result afterwards.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
1 file changed