* [PATCH] target/nios2: Fix semihost lseek offset computation
@ 2023-07-31 23:52 Keith Packard via
2023-08-01 12:06 ` Peter Maydell
2023-08-01 21:46 ` Philippe Mathieu-Daudé
0 siblings, 2 replies; 4+ messages in thread
From: Keith Packard via @ 2023-07-31 23:52 UTC (permalink / raw)
To: qemu-devel; +Cc: Chris Wulff, Marek Vasut, Keith Packard
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>
---
target/nios2/nios2-semi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/nios2/nios2-semi.c b/target/nios2/nios2-semi.c
index ffd1f095f6..fc1df1dfeb 100644
--- a/target/nios2/nios2-semi.c
+++ b/target/nios2/nios2-semi.c
@@ -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:
--
2.40.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] target/nios2: Fix semihost lseek offset computation
2023-07-31 23:52 [PATCH] target/nios2: Fix semihost lseek offset computation Keith Packard via
@ 2023-08-01 12:06 ` Peter Maydell
2023-08-01 13:23 ` Philippe Mathieu-Daudé
2023-08-01 21:46 ` Philippe Mathieu-Daudé
1 sibling, 1 reply; 4+ messages in thread
From: Peter Maydell @ 2023-08-01 12:06 UTC (permalink / raw)
To: Keith Packard; +Cc: qemu-devel, Chris Wulff, Marek Vasut
On Tue, 1 Aug 2023 at 00:53, Keith Packard via <qemu-devel@nongnu.org> wrote:
>
> 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>
> ---
> target/nios2/nios2-semi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/nios2/nios2-semi.c b/target/nios2/nios2-semi.c
> index ffd1f095f6..fc1df1dfeb 100644
> --- a/target/nios2/nios2-semi.c
> +++ b/target/nios2/nios2-semi.c
> @@ -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:
Fixes: d1e23cbaa403b2d ("target/nios2: Use semihosting/syscalls.h")
Cc: qemu-stable@nongnu.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] target/nios2: Fix semihost lseek offset computation
2023-08-01 12:06 ` Peter Maydell
@ 2023-08-01 13:23 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-08-01 13:23 UTC (permalink / raw)
To: Peter Maydell, Keith Packard
Cc: qemu-devel, Chris Wulff, Marek Vasut, Richard Henderson,
Laurent Vivier
On 1/8/23 14:06, Peter Maydell wrote:
> On Tue, 1 Aug 2023 at 00:53, Keith Packard via <qemu-devel@nongnu.org> wrote:
>>
>> 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>
>> ---
>> target/nios2/nios2-semi.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/target/nios2/nios2-semi.c b/target/nios2/nios2-semi.c
>> index ffd1f095f6..fc1df1dfeb 100644
>> --- a/target/nios2/nios2-semi.c
>> +++ b/target/nios2/nios2-semi.c
>> @@ -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:
>
> Fixes: d1e23cbaa403b2d ("target/nios2: Use semihosting/syscalls.h")
> Cc: qemu-stable@nongnu.org
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Commit 950272506d ("target/m68k: Use semihosting/syscalls.h") has the
same issue.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] target/nios2: Fix semihost lseek offset computation
2023-07-31 23:52 [PATCH] target/nios2: Fix semihost lseek offset computation Keith Packard via
2023-08-01 12:06 ` Peter Maydell
@ 2023-08-01 21:46 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-08-01 21:46 UTC (permalink / raw)
To: Keith Packard, qemu-devel; +Cc: Chris Wulff, Marek Vasut
On 1/8/23 01:52, Keith Packard via wrote:
> 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>
> ---
> target/nios2/nios2-semi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks, queued via misc-fixes.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-08-01 21:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-31 23:52 [PATCH] target/nios2: Fix semihost lseek offset computation Keith Packard via
2023-08-01 12:06 ` Peter Maydell
2023-08-01 13:23 ` Philippe Mathieu-Daudé
2023-08-01 21:46 ` Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).