[−][src]Trait bitintr::Cls
Count leading sign bits
Required methods
fn cls(self) -> Self
Counts the leading most significant bits set.
When all bits of the operand are set it returns the size of the operand in bits.
Keywords: count leading sign bits, count leading ones, count leading bits set.
Instructions
- [
CLS
](http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc. ddi0487a.k_10775/index.html):- Description: Count leading sign bits.
- Architecture: ARMv8.
- Registers: 32/64 bits.
Example
let n = 0b1111_1111_1100_1010_u16; assert_eq!(n.cls(), 9); assert_eq!(0b1111_1111_u8.cls(), 7);