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 the number of trailing zeros without clz?

I am trying to count the number of trailing zeros in floating points without using the clz command. what would be the easiest way to rewrite this code?


ctz
        RSB      r1,r0,#0
        CMP      r0,#0
        AND      r0,r0,r1
        CLZ      r0,r0
        RSBNE    r0,r0,#0x1f
        BX    lr

hth

s.