mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-28 23:09:46 +01:00
8c2a4b43b3
19027: sys/fmt: optimize scn_u32_dec scn_u32_hex r=benpicco a=kfessel ### Contribution description Improves the compilation result for `scn_u32_dec` `scn_u32_hex` especially on `cortex-m` reducing either stack usage and or code size. This makes use of unsigned int overflow (slightly less better without doing that `hexn`). See godbolt (original versions got an `o` attached, modified versions got `k`s) all functions are marked `_S_` defined to `static` by assigning the global at end the compiled function can be changed (`deco deck hexo hexk hexkk hexn`) this PR is `hexkk` and `deck` ### Testing procedure run unit-test/test-fmt ``` <RIOT>/tests/unittests$ make tests-fmt <RIOT>/tests/unittests$ make term ``` ### Issues/PRs references [godbolt](https://godbolt.org/z/MzT1zh4q1) Co-authored-by: Karl Fessel <karl.fessel@ovgu.de> |
||
---|---|---|
.. | ||
fmt.c | ||
Kconfig | ||
Makefile | ||
table.c |