This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

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

    But how many clock cycles does CLZ require to execute???


    For an ARM9, assuming you are not targeting the PC as the destination register (because that would be a bit crazy).

    One cycle if not using the shifter to shift the second input operand, or using a constant shift.
    Two cycles if using the shifter to shift the second operation with a register value input to the shifter.

    This is the same as any other ARM9 data processing instruction (ADD, ORR, etc).
Reply
  • Note: This was originally posted on 7th April 2009 at http://forums.arm.com

    But how many clock cycles does CLZ require to execute???


    For an ARM9, assuming you are not targeting the PC as the destination register (because that would be a bit crazy).

    One cycle if not using the shifter to shift the second input operand, or using a constant shift.
    Two cycles if using the shifter to shift the second operation with a register value input to the shifter.

    This is the same as any other ARM9 data processing instruction (ADD, ORR, etc).
Children
No data