As Dmitry K. wrote: > > This makes 6 clocks per cycle, so up to ~ 100 clocks max.
> Misprint: 7 clocks per cycle (rjmp). OK, I've confused that with the number of code words. > > I'm interested in seeing Dmitry's code... > > I have use byte-width shift: > > #define val_lo r24 > #define val_hi r25 > #define cntr r30 > ... > ffs: > ldi cntr, 1 > tst val_lo > brne 2f > or val_lo, val_hi > breq 9f > ldi cntr, 8 > 1: inc cntr > 2: ror val_lo > brcc 1b > mov r24, cntr > clr r25 > 9: ret Oh, I see. The only thing I'm not too keen on is to have more assembler files in the tree. But the code is for sure excellent. ;-) -- cheers, J"org .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) _______________________________________________ AVR-libc-dev mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-libc-dev
