On Wednesday 20 April 2005 06:31, Joerg Wunsch wrote:
> As Eric Weddington wrote:
> > For reference, the ffs function can be found in newlib.
> > <http://sources.redhat.com/newlib/libc.html#SEC187>
>
> Which probably took it straight from the BSD lib. ;-)
>
> As the function is so simple, and the BSD copyright matches our
> copyright (clause 3 may officially be omitted), we can easily import
> it.
I have look 'ffs' from newlib (1.12.0). It take up to 800 (!) clocks.
Reason: shift is included to loop.
My realisation for AVR:
ffs: 12 words, 39 clocks max
ffsl: 18 words, 45 clocks max
ffsll: 30 words, 57 clocks max
I shall send it after all tests writing.
Dmitry.
_______________________________________________
AVR-libc-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-libc-dev