ghaerr / elks

Embeddable Linux Kernel Subset - Linux for 8086
Other
999 stars 108 forks source link

[libc] Use __divmod in ltoa, ultoa, ltostr, ultostr and dd #2015

Closed ghaerr closed 2 weeks ago

ghaerr commented 2 weeks ago

This is the final PR in the series, using the much faster __divmod routine for number to string conversion in the C library.

Executables using these library functions are now ~60 bytes smaller than when udivsi3/umodsi3 were used.

Test code has been moved to elkscmd/test/other/test_float.c, where some of these routines were already being tested.