(value: u64)
| 224 | #[must_use] |
| 225 | #[allow(clippy::cast_possible_truncation)] |
| 226 | pub const fn leading_zeros_u64(value: u64) -> u32 { |
| 227 | #[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))] |
| 228 | { |
| 229 | value.leading_zeros() |
| 230 | } |
| 231 | #[cfg(not(any(target_arch = "aarch64", target_arch = "x86_64")))] |
| 232 | { |
| 233 | let hi = (value >> 32) as u32; |
| 234 | let lo = value as u32; |
| 235 | let mask = Choice::from_u32_nz(hi).not().to_u32_mask(); |
| 236 | leading_zeros_u32(hi).wrapping_add(mask & leading_zeros_u32(lo)) |
| 237 | } |
| 238 | } |
| 239 | |
| 240 | /// Count trailing zero bits, returning 64 if `value` is zero. |
| 241 | #[inline] |
nothing calls this directly
no test coverage detected