printf shrinkery

Andy Ross

Inspired by the printf discussion last week and no one's explicit
rejection of a quick code-size-reduction patch I threw out, I spent a
little more time in the minimal libc printf implementation, finding
stuff that can be removed or unified. Patch series in gerrit: libc/printf: Unify & simplify number printing libc/printf: Remove vestigial "full" parameter to _to_float() libc/printf: Use compiler-provided 64 bit math, phase 1 libc/printf: Use compiler-provided 64 bit math, phase 2

There's the unified number-formatting code from before, and I
discovered that the floating point generation had a hand-coded 64 bit
math implementation that can be pretty easily replaced with
compiler-provied uint64_t math. Still passes sanitycheck, which
includes our existing sprintf test, plus all the stuff I could find or
hack to use as a unit test. Please review.

Total code savings for the whole patch series is ~400 bytes with no
loss of functionality, so not earthshattering but IMHO worth it. And
floating point output is almost certainly significantly faster, though


Join to automatically receive all group messages.