* [PATCH] target/tricore: Fix OPC1_16_SRO_LD_H translation
@ 2023-01-12 14:24 Anton Kochkov
2023-01-12 16:11 ` Philippe Mathieu-Daudé
2023-01-12 21:03 ` Bastian Koppelmann
0 siblings, 2 replies; 5+ messages in thread
From: Anton Kochkov @ 2023-01-12 14:24 UTC (permalink / raw)
To: qemu-devel; +Cc: eitan_eliahu, Anton Kochkov, Bastian Koppelmann
Signed-off-by: Eitan Eliahu <eitan_eliahu@hotmail.com>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/652
---
target/tricore/translate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/tricore/translate.c b/target/tricore/translate.c
index df9e46c649..b2a5e11778 100644
--- a/target/tricore/translate.c
+++ b/target/tricore/translate.c
@@ -3878,7 +3878,7 @@ static void decode_sro_opc(DisasContext *ctx, int op1)
gen_offset_ld(ctx, cpu_gpr_d[15], cpu_gpr_a[r2], address, MO_UB);
break;
case OPC1_16_SRO_LD_H:
- gen_offset_ld(ctx, cpu_gpr_d[15], cpu_gpr_a[r2], address, MO_LESW);
+ gen_offset_ld(ctx, cpu_gpr_d[15], cpu_gpr_a[r2], address * 2, MO_LESW);
break;
case OPC1_16_SRO_LD_W:
gen_offset_ld(ctx, cpu_gpr_d[15], cpu_gpr_a[r2], address * 4, MO_LESL);
--
2.39.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] target/tricore: Fix OPC1_16_SRO_LD_H translation
2023-01-12 14:24 [PATCH] target/tricore: Fix OPC1_16_SRO_LD_H translation Anton Kochkov
@ 2023-01-12 16:11 ` Philippe Mathieu-Daudé
2023-01-12 21:03 ` Bastian Koppelmann
1 sibling, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-01-12 16:11 UTC (permalink / raw)
To: Anton Kochkov, qemu-devel; +Cc: eitan_eliahu, Bastian Koppelmann
On 12/1/23 15:24, Anton Kochkov wrote:
Fixes: 5a7634a28c ("target-tricore: Add instructions of SLR, SSRO and
SRO opcode format")
> Signed-off-by: Eitan Eliahu <eitan_eliahu@hotmail.com>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/652
> ---
> target/tricore/translate.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/tricore/translate.c b/target/tricore/translate.c
> index df9e46c649..b2a5e11778 100644
> --- a/target/tricore/translate.c
> +++ b/target/tricore/translate.c
> @@ -3878,7 +3878,7 @@ static void decode_sro_opc(DisasContext *ctx, int op1)
> gen_offset_ld(ctx, cpu_gpr_d[15], cpu_gpr_a[r2], address, MO_UB);
> break;
> case OPC1_16_SRO_LD_H:
> - gen_offset_ld(ctx, cpu_gpr_d[15], cpu_gpr_a[r2], address, MO_LESW);
> + gen_offset_ld(ctx, cpu_gpr_d[15], cpu_gpr_a[r2], address * 2, MO_LESW);
Good catch!
> break;
> case OPC1_16_SRO_LD_W:
> gen_offset_ld(ctx, cpu_gpr_d[15], cpu_gpr_a[r2], address * 4, MO_LESL);
> --
> 2.39.0
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] target/tricore: Fix OPC1_16_SRO_LD_H translation
2023-01-12 14:24 [PATCH] target/tricore: Fix OPC1_16_SRO_LD_H translation Anton Kochkov
2023-01-12 16:11 ` Philippe Mathieu-Daudé
@ 2023-01-12 21:03 ` Bastian Koppelmann
2023-02-02 15:55 ` Anton Kochkov
1 sibling, 1 reply; 5+ messages in thread
From: Bastian Koppelmann @ 2023-01-12 21:03 UTC (permalink / raw)
To: Anton Kochkov; +Cc: qemu-devel, eitan_eliahu
On Thu, Jan 12, 2023 at 02:24:02PM +0000, Anton Kochkov wrote:
> Signed-off-by: Eitan Eliahu <eitan_eliahu@hotmail.com>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/652
> ---
> target/tricore/translate.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/tricore/translate.c b/target/tricore/translate.c
> index df9e46c649..b2a5e11778 100644
> --- a/target/tricore/translate.c
> +++ b/target/tricore/translate.c
> @@ -3878,7 +3878,7 @@ static void decode_sro_opc(DisasContext *ctx, int op1)
> gen_offset_ld(ctx, cpu_gpr_d[15], cpu_gpr_a[r2], address, MO_UB);
> break;
> case OPC1_16_SRO_LD_H:
> - gen_offset_ld(ctx, cpu_gpr_d[15], cpu_gpr_a[r2], address, MO_LESW);
> + gen_offset_ld(ctx, cpu_gpr_d[15], cpu_gpr_a[r2], address * 2, MO_LESW);
> break;
> case OPC1_16_SRO_LD_W:
> gen_offset_ld(ctx, cpu_gpr_d[15], cpu_gpr_a[r2], address * 4, MO_LESL);
> --
> 2.39.0
Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
As Phil said, good catch. I added it to my TriCore queue.
I saw on the bugtracker that you have testcase. Are you interested in adding it to
tests/tcg/tricore?
Cheers,
Bastian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] target/tricore: Fix OPC1_16_SRO_LD_H translation
2023-01-12 21:03 ` Bastian Koppelmann
@ 2023-02-02 15:55 ` Anton Kochkov
2023-02-08 9:16 ` Bastian Koppelmann
0 siblings, 1 reply; 5+ messages in thread
From: Anton Kochkov @ 2023-02-02 15:55 UTC (permalink / raw)
To: Bastian Koppelmann; +Cc: qemu-devel, eitan_eliahu
------- Original Message -------
On Friday, January 13th, 2023 at 5:03 AM, Bastian Koppelmann <kbastian@mail.uni-paderborn.de> wrote:
>
>
> On Thu, Jan 12, 2023 at 02:24:02PM +0000, Anton Kochkov wrote:
>
> > Signed-off-by: Eitan Eliahu eitan_eliahu@hotmail.com
> > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/652
> > ---
> > target/tricore/translate.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/target/tricore/translate.c b/target/tricore/translate.c
> > index df9e46c649..b2a5e11778 100644
> > --- a/target/tricore/translate.c
> > +++ b/target/tricore/translate.c
> > @@ -3878,7 +3878,7 @@ static void decode_sro_opc(DisasContext *ctx, int op1)
> > gen_offset_ld(ctx, cpu_gpr_d[15], cpu_gpr_a[r2], address, MO_UB);
> > break;
> > case OPC1_16_SRO_LD_H:
> > - gen_offset_ld(ctx, cpu_gpr_d[15], cpu_gpr_a[r2], address, MO_LESW);
> > + gen_offset_ld(ctx, cpu_gpr_d[15], cpu_gpr_a[r2], address * 2, MO_LESW);
> > break;
> > case OPC1_16_SRO_LD_W:
> > gen_offset_ld(ctx, cpu_gpr_d[15], cpu_gpr_a[r2], address * 4, MO_LESL);
> > --
> > 2.39.0
>
>
> Reviewed-by: Bastian Koppelmann kbastian@mail.uni-paderborn.de
>
>
> As Phil said, good catch. I added it to my TriCore queue.
>
> I saw on the bugtracker that you have testcase. Are you interested in adding it to
> tests/tcg/tricore?
Sorry for the late answer - it's not me who initially opened the original issue thus I don't have a test case.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] target/tricore: Fix OPC1_16_SRO_LD_H translation
2023-02-02 15:55 ` Anton Kochkov
@ 2023-02-08 9:16 ` Bastian Koppelmann
0 siblings, 0 replies; 5+ messages in thread
From: Bastian Koppelmann @ 2023-02-08 9:16 UTC (permalink / raw)
To: Anton Kochkov; +Cc: qemu-devel, eitan_eliahu
On Thu, Feb 02, 2023 at 03:55:53PM +0000, Anton Kochkov wrote:
> ------- Original Message -------
> On Friday, January 13th, 2023 at 5:03 AM, Bastian Koppelmann <kbastian@mail.uni-paderborn.de> wrote:
>
>
> >
> >
> > On Thu, Jan 12, 2023 at 02:24:02PM +0000, Anton Kochkov wrote:
> >
> > > Signed-off-by: Eitan Eliahu eitan_eliahu@hotmail.com
> > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/652
> > > ---
> > > target/tricore/translate.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/target/tricore/translate.c b/target/tricore/translate.c
> > > index df9e46c649..b2a5e11778 100644
> > > --- a/target/tricore/translate.c
> > > +++ b/target/tricore/translate.c
> > > @@ -3878,7 +3878,7 @@ static void decode_sro_opc(DisasContext *ctx, int op1)
> > > gen_offset_ld(ctx, cpu_gpr_d[15], cpu_gpr_a[r2], address, MO_UB);
> > > break;
> > > case OPC1_16_SRO_LD_H:
> > > - gen_offset_ld(ctx, cpu_gpr_d[15], cpu_gpr_a[r2], address, MO_LESW);
> > > + gen_offset_ld(ctx, cpu_gpr_d[15], cpu_gpr_a[r2], address * 2, MO_LESW);
> > > break;
> > > case OPC1_16_SRO_LD_W:
> > > gen_offset_ld(ctx, cpu_gpr_d[15], cpu_gpr_a[r2], address * 4, MO_LESL);
> > > --
> > > 2.39.0
> >
> >
> > Reviewed-by: Bastian Koppelmann kbastian@mail.uni-paderborn.de
> >
> >
> > As Phil said, good catch. I added it to my TriCore queue.
> >
> > I saw on the bugtracker that you have testcase. Are you interested in adding it to
> > tests/tcg/tricore?
>
> Sorry for the late answer - it's not me who initially opened the original issue thus I don't have a test case.
No worries. I created a test myself (see
https://lore.kernel.org/qemu-devel/20230203132132.511254-1-kbastian@mail.uni-paderborn.de/)
Cheers,
Bastian
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-02-08 9:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-12 14:24 [PATCH] target/tricore: Fix OPC1_16_SRO_LD_H translation Anton Kochkov
2023-01-12 16:11 ` Philippe Mathieu-Daudé
2023-01-12 21:03 ` Bastian Koppelmann
2023-02-02 15:55 ` Anton Kochkov
2023-02-08 9:16 ` Bastian Koppelmann
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).