While RegMask::find_highest_bit isn't a very hot method, its implementation is quite inefficient compared to what's possible using compiler intrinsics like gcc's __builtin_clz. For platforms without intrinsics a more efficient implementation can be used.
Introduce a count_trailing_zeros utility method, initially for 32-bit unsigned integer values.
Introduce a count_trailing_zeros utility method, initially for 32-bit unsigned integer values.