Count Leading Zeros

Note: This was originally posted on 6th April 2009 at http://forums.arm.com

Using the ARM9 CLZ instruction - I am wondering, generally, how often would it be required to use this function and does it justify its inclusion?
Parents
  • Note: This was originally posted on 7th April 2009 at http://forums.arm.com

    For general purpose code it is commonly used for integer normalization (placing the MSB of the integer at a known location).

    In more practical terms normalized integers are used for optimized Newton-Raphson software integer division, as Jacob mentioned, but also things like  integer to floating point conversion, and bit-field priority decoders.


    Thanks for the replies!

    On the contrary, what then are the disadvantages of the CLZ instruction being included in the ARM9? If any?
Reply
  • Note: This was originally posted on 7th April 2009 at http://forums.arm.com

    For general purpose code it is commonly used for integer normalization (placing the MSB of the integer at a known location).

    In more practical terms normalized integers are used for optimized Newton-Raphson software integer division, as Jacob mentioned, but also things like  integer to floating point conversion, and bit-field priority decoders.


    Thanks for the replies!

    On the contrary, what then are the disadvantages of the CLZ instruction being included in the ARM9? If any?
Children
No data
More questions in this forum