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.

Parents Reply Children
No data
More questions in this forum