OSDN Git Service

tools/nolibc: make argc 32-bit in riscv startup code
authorWilly Tarreau <w@1wt.eu>
Tue, 19 Jul 2022 21:44:32 +0000 (23:44 +0200)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 31 Aug 2022 12:17:43 +0000 (05:17 -0700)
commita30d551f34df66d739949a6140b50496afa36f66
treea2ca04a346e3e6f3d74ead0636f24bbab554e48c
parent568035b01cfb107af8d2e4bd2fb9aea22cf5b868
tools/nolibc: make argc 32-bit in riscv startup code

The "ld a0, 0(sp)" instruction doesn't build on RISCV32 because that
would load a 64-bit value into a 32-bit register. But argc 32-bit,
not 64, so we ought to use "lw" here. Tested on both RISCV32 and
RISCV64.

Cc: Pranith Kumar <bobby.prani@gmail.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/include/nolibc/arch-riscv.h