target/nios2: Fix semihost lseek offset computation
PATCH 1/1 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.
--- target/nios2/nios2-semi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target/nios2/nios2-semi.c +1 -1
@@ -170,7 +170,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 :
Signature · 1 line
2.40.1
Quoted 15 lines · Keith Packard via
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 <[email protected]>--- target/nios2/nios2-semi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)target/nios2/nios2-semi.c +0
-0
target/nios2/nios2-semi.c void do_nios2_semihosting(CPUNios2State *env) · line 176
Quoted 8 lines
target/nios2/nios2-semi.c +1
-1@@ -170,7 +170,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 :
thanks
-- PMM
Philippe Mathieu-Daudé
Reviewed-byQuoted 23 lines · Peter Maydell
Quoted 22 lines · Keith Packard via
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 <[email protected]>--- target/nios2/nios2-semi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)target/nios2/nios2-semi.c +1
-1@@ -170,7 +170,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 ;
Quoted 5 lines
target/nios2/nios2-semi.c void do_nios2_semihosting(CPUNios2State *env) · line 176
Quoted 1 line
target/nios2/nios2-semi.c +0
-0case HOSTED_RENAME :Fixes d1e23cbaa403b2d ("target/nios2: Use semihosting/syscalls.h")Reviewed-by Peter Maydell <[email protected]>
Commit 950272506d ("target/m68k: Use semihosting/syscalls.h") has the same issue.
Quoted 8 lines · Keith Packard via
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 <[email protected]>--- target/nios2/nios2-semi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks, queued via misc-fixes.