Function bit_lowest_set_mask_u32

pub fn bit_lowest_set_mask_u32(a: u32) -> u32 
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 u32.

If the input is 0, you get u32::MAX

  • Formula: (a - 1) ^ a

  • Intrinsic: _blsmsk_u32

  • Assembly: blsmsk r32, r32