diff options
author | Keith Packard <keithp@keithp.com> | 2023-07-31 16:52:45 -0700 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-08-01 23:52:23 +0200 |
commit | 71e2dd6aa1bdbac19c661638a4ae91816002ac9e (patch) | |
tree | 7bf4293d9227793bc21a979b39563966a91fde76 /target/nios2 | |
parent | c11d5bdae79a8edaf00dfcb2e49c064a50c67671 (diff) | |
download | qemu-71e2dd6aa1bdbac19c661638a4ae91816002ac9e.zip qemu-71e2dd6aa1bdbac19c661638a4ae91816002ac9e.tar.gz qemu-71e2dd6aa1bdbac19c661638a4ae91816002ac9e.tar.bz2 |
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>
Diffstat (limited to 'target/nios2')
-rw-r--r-- | target/nios2/nios2-semi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/nios2/nios2-semi.c b/target/nios2/nios2-semi.c index f3b7aee..9d0241c 100644 --- a/target/nios2/nios2-semi.c +++ b/target/nios2/nios2-semi.c @@ -169,7 +169,7 @@ void do_nios2_semihosting(CPUNios2State *env) GET_ARG64(2); GET_ARG64(3); semihost_sys_lseek(cs, nios2_semi_u64_cb, arg0, - deposit64(arg2, arg1, 32, 32), arg3); + deposit64(arg2, 32, 32, arg1), arg3); break; case HOSTED_RENAME: |