Function bitintr::arm::v8::cls
[−]
[src]
pub fn cls<T: Int>(x: T) -> T
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.
Assembly Instructions
CLS
:- Description: Count leading sign bits.
- Architecture: ARMv8.
- Registers: 32/64 bits.
Example
use bitintr::arm::v8::*; let n = 0b1111_1111_1100_1010u16; assert_eq!(n.cls(), 10); assert_eq!(cls(0b1111_1111u8), 8);