[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] Interested in 64-bit printf support?
From: |
Georg-Johann Lay |
Subject: |
Re: [avr-libc-dev] Interested in 64-bit printf support? |
Date: |
Wed, 07 Dec 2016 22:48:27 +0100 |
User-agent: |
Thunderbird 2.0.0.24 (Windows/20100228) |
George Spelvin a écrit:
The developers of the TICC time interval counter are having
a problem printing 64-bit integers:
https://github.com/TAPR/TICC/blob/master/TO-DO.txt
As an aside, attached is an AVR asm code (needs MUL) that
transforms uint64_t to decimal string.
Despite most algorithms, it starts with the highest digit
and need no string reversion, and it doesn't need div or mod.
The show stopper is presumably the code size because of the
multiplication by 10: The value to convert is passed in regs
as of
extern void put64 (uint64_t val, char *buf);
The algo is rather slow because it always iterates over all
digits, i.e. it won't run faster for small numbers.
Have fun!
Code size is ~140 bytes.
Johann
- Re: [avr-libc-dev] Interested in 64-bit printf support?, (continued)
- Re: [avr-libc-dev] Interested in 64-bit printf support?, Georg-Johann Lay, 2016/12/06
- Re: [avr-libc-dev] Interested in 64-bit printf support?, George Spelvin, 2016/12/06
- Re: [avr-libc-dev] Interested in 64-bit printf support?, George Spelvin, 2016/12/06
- [avr-libc-dev] I just noticed OPTIMIZE_SPEED, George Spelvin, 2016/12/06
- Re: [avr-libc-dev] I just noticed OPTIMIZE_SPEED, Joerg Wunsch, 2016/12/06
- Re: [avr-libc-dev] I just noticed OPTIMIZE_SPEED, George Spelvin, 2016/12/06
- Re: [avr-libc-dev] I just noticed OPTIMIZE_SPEED, Joerg Wunsch, 2016/12/07
- Re: [avr-libc-dev] I just noticed OPTIMIZE_SPEED, Georg-Johann Lay, 2016/12/08
Re: [avr-libc-dev] Interested in 64-bit printf support?,
Georg-Johann Lay <=