(value: u32)
| 170 | #[inline] |
| 171 | #[must_use] |
| 172 | pub const fn leading_zeros_u32(value: u32) -> u32 { |
| 173 | #[cfg(any( |
| 174 | target_arch = "aarch64", |
| 175 | target_arch = "x86", |
| 176 | target_arch = "x86_64", |
| 177 | target_feature = "thumb2", |
| 178 | target_feature = "zbb" |
| 179 | ))] |
| 180 | { |
| 181 | value.leading_zeros() |
| 182 | } |
| 183 | #[cfg(not(any( |
| 184 | target_arch = "aarch64", |
| 185 | target_arch = "x86", |
| 186 | target_arch = "x86_64", |
| 187 | target_feature = "thumb2", |
| 188 | target_feature = "zbb" |
| 189 | )))] |
| 190 | { |
| 191 | leading_zeros_u32_soft(value) |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | /// Count trailing zero bits, returning 32 if `value` is zero. |
| 196 | #[inline] |
no test coverage detected