[−][src]Function safe_arch::bit_extract2_u64
#[must_use]pub fn bit_extract2_u64(a: u64, control: u64) -> u64
This is supported with target feature
bmi1
only.Extract a span of bits from the u64
, control value style.
- Bits 0 through 7: start position.
- Bits 8 through 15: span length.
assert_eq!(bit_extract2_u64(0b0110, (3 << 8) | 0), 0b110); assert_eq!(bit_extract2_u64(0b0110, (2 << 8) | 0), 0b10); assert_eq!(bit_extract2_u64(0b0110, (2 << 8) | 1), 0b11);