tools/nolibc/stdlib: avoid a 64-bit shift in u64toh_r()
authorWilly Tarreau <w@1wt.eu>
Mon, 7 Feb 2022 16:23:37 +0000 (17:23 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 24 Feb 2022 17:56:45 +0000 (09:56 -0800)
commitacc3571581f1f472b6696e71e0133246f688c328
treecb0ebd82345e55c7c0364e6045a29a2481aee064
parent3edfdacd944a5f9d2fe488fd545d70955e5d9aab
tools/nolibc/stdlib: avoid a 64-bit shift in u64toh_r()

The build of printf() on mips requires libgcc for functions __ashldi3 and
__lshrdi3 due to 64-bit shifts when scanning the input number. These are
not really needed in fact since we scan the number 4 bits at a time. Let's
arrange the loop to perform two 32-bit shifts instead on 32-bit platforms.

Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/include/nolibc/stdlib.h