[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-7.2.5 25/36] target/nios2: Fix semihost lseek offset computation
From: |
Michael Tokarev |
Subject: |
[Stable-7.2.5 25/36] target/nios2: Fix semihost lseek offset computation |
Date: |
Fri, 4 Aug 2023 21:53:38 +0300 |
From: Keith Packard <keithp@keithp.com>
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>
(cherry picked from commit 71e2dd6aa1bdbac19c661638a4ae91816002ac9e)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/target/nios2/nios2-semi.c b/target/nios2/nios2-semi.c
index 29ac27035e..19a7d0e763 100644
--- a/target/nios2/nios2-semi.c
+++ b/target/nios2/nios2-semi.c
@@ -168,7 +168,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.39.2
- [PATCH v2 0/7] target/mips: Convert Loongson LEXT opcodes to decodetree, Philippe Mathieu-Daudé, 2023/08/31
- [PATCH v2 1/7] target/mips: Simplify Loongson MULTU.G opcode, Philippe Mathieu-Daudé, 2023/08/31
- [PATCH v2 2/7] target/mips: Re-introduce OPC_ADDUH_QB_DSP and OPC_MUL_PH_DSP, Philippe Mathieu-Daudé, 2023/08/31
- [PATCH v2 3/7] target/mips: Convert Loongson DDIV.G opcodes to decodetree, Philippe Mathieu-Daudé, 2023/08/31
- [PATCH v2 4/7] target/mips: Convert Loongson DIV.G opcodes to decodetree, Philippe Mathieu-Daudé, 2023/08/31
- [PATCH v2 5/7] target/mips: Convert Loongson [D]DIVU.G opcodes to decodetree, Philippe Mathieu-Daudé, 2023/08/31
- [PATCH v2 6/7] target/mips: Convert Loongson [D]MOD[U].G opcodes to decodetree, Philippe Mathieu-Daudé, 2023/08/31
- [PATCH v2 7/7] target/mips: Convert Loongson [D]MULT[U].G opcodes to decodetree, Philippe Mathieu-Daudé, 2023/08/31