1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
use Int;
/// Zero the high bits of `x` at position >= `bit_position`.
///
/// # Panics
///
/// If `bit_position >= bit_size()` the behavior is undefined (panics in debug
/// builds).
///
/// # Intrinsics (when available BMI2)
///
/// [`BZHI`](http://www.felixcloutier.com/x86/BZHI.html): Zero high bits
/// starting with specified bit position (supports 32/64 bit registers).
///
/// # Examples
///
/// ```
/// use bitintr::bmi2::bzhi;
///
/// let n = 0b1111_0010u32;
/// let s = 0b0001_0010u32;
/// assert_eq!(bzhi(n, 5), s);
/// ```