Function bit_lowest_set_mask_u64
pub fn bit_lowest_set_mask_u64(a: u64) -> u64
Available on crate feature
dep_safe_arch
only.Expand description
Gets the mask of all bits up to and including the lowest set bit in a u64
.
If the input is 0, you get u64::MAX
-
Formula:
(a - 1) ^ a
-
Intrinsic:
_blsmsk_u64
-
Assembly:
blsmsk r64, r64