4.4.7 Count Leading Zero
Format:
CTLZ | Rb.rq,Rc.wq | ! Operate format |
Operation:
temp = 0
FOR i FROM 63 DOWN TO 0
IF { Rbv<i> EQ 1 } THEN BREAK temp = temp + 1
END
Rc<6:0> ← temp<6:0> Rc<63:7> ← 0
Exceptions:
None
Instruction mnemonics:
CTLZ | Count Leading Zero |
Qualifiers:
None
Description:
The number of leading zeros in Rb, starting at the most significant bit position, is written to Rc. Ra must be R31.
Instruction Descriptions