target/nios2: Fix semihost lseek offset computation
authorKeith Packard <keithp@keithp.com>
Mon, 31 Jul 2023 23:52:45 +0000 (16:52 -0700)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 1 Aug 2023 21:52:23 +0000 (23:52 +0200)
commit71e2dd6aa1bdbac19c661638a4ae91816002ac9e
tree7bf4293d9227793bc21a979b39563966a91fde76
parentc11d5bdae79a8edaf00dfcb2e49c064a50c67671
target/nios2: Fix semihost lseek offset computation

The arguments for deposit64 are (value, start, length, fieldval); this
appears to have thought they were (value, fieldval, start,
length). Reorder the parameters to match the actual function.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Fixes: d1e23cbaa403b2d ("target/nios2: Use semihosting/syscalls.h")
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20230731235245.295513-1-keithp@keithp.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
target/nios2/nios2-semi.c