Format |
Syntax: |
Operation: |
Operands: |
Architecture revision |
Opcode | ||||||||||
1 |
clz Rd, Rs |
temp = 32; for (i = 31; i >= 0; i--) if (Rs[i] == 1) then temp = 31 - i; break; Rd = temp; |
{d, s} ∈ {0, 1, …, 15} |
Rev1+ |
|
Counts the number of binary zero bits before the first binary one bit in a register value. The value returned from the operation can be used for doing normalize operations. If the operand is zero, the value 32 is returned.
Q: |
Not affected |
V: |
Not affected |
N: |
Not affected |
Z: |
Z = (RES[31:0] == 0) |
C: |
C = (RES[31:0] == 32) |