]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
target/m68k: Fix semihost lseek offset computation
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 1 Aug 2023 15:45:19 +0000 (16:45 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 1 Aug 2023 21:52:23 +0000 (23:52 +0200)
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.

Cc: qemu-stable@nongnu.org
Fixes: 950272506d ("target/m68k: Use semihosting/syscalls.h")
Reported-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230801154519.3505531-1-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
target/m68k/m68k-semi.c

index 88ad9ba814489cc9797c06f9a3f6b8972f20bd49..239f6e44e908d27c951288b090502e03fe5027e9 100644 (file)
@@ -166,7 +166,7 @@ void do_m68k_semihosting(CPUM68KState *env, int nr)
         GET_ARG64(2);
         GET_ARG64(3);
         semihost_sys_lseek(cs, m68k_semi_u64_cb, arg0,
-                           deposit64(arg2, arg1, 32, 32), arg3);
+                           deposit64(arg2, 32, 32, arg1), arg3);
         break;
 
     case HOSTED_RENAME: