summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorDavid Laight <david.laight.linux@gmail.com>2026-03-08 11:37:41 +0000
committerThomas Weißschuh <linux@weissschuh.net>2026-03-20 17:58:24 +0100
commit248c7cf60c808f09044af1ce1d2c7c707696dc1e (patch)
tree929a0a4103d5923b1c9c9f8350cdd58b3108430b /tools/perf/scripts/python
parentd3d3f64f8e964f8af6ac72294e65caad5acc452e (diff)
tools/nolibc/printf: Add support for octal output
Octal output isn't often used, but adding it costs very little. Supporting "%#o" is mildly annoying, it has to add a leading '0' if there isn't one present. In simple cases this is the same as adding a sign of '0' - but that adds an extra '0' in a few places. So you need 3 tests, %o, # and no leading '0' (which can only be checked after the zero pad for precision). If all the test are deferred until after zero padding then too many values are 'live' across the call to _nolibc_u64toa_base() and get spilled to stack. Hence the check that ignores the 'sign' if it is the same as the first character of the output string. Add tests for octal output. Signed-off-by: David Laight <david.laight.linux@gmail.com> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260308113742.12649-17-david.laight.linux@gmail.com [Thomas: avoid a -Wsign-compare] Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions