Hi,
Is there an instruction or function in rts or fastmath lib for Counting Leading Zeros, like CLZ on ARM9?
Thanks
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
The LMBD assembly instruction and _lmbd() C intrinsic are the "Leftmost Bit Detection" instruction. This will tell you how many bits to skip from the left-hand or Most Significant end of a 32-bit source register to reach the bit value you seek. This can be done to get the number of leading 0s or the number of leading 1s.
To understand more detail about the instruction and how to use it, please refer to the "CPU & Instruction Reference Guide" for the processor you are using.