From: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
To: David Brenken <david.brenken@efs-auto.org>, qemu-devel@nongnu.org
Cc: Andreas Konopik <andreas.konopik@efs-auto.de>,
David Brenken <david.brenken@efs-auto.de>,
Robert Rasche <robert.rasche@efs-auto.de>,
Georg Hofstetter <georg.hofstetter@efs-auto.de>,
Lars Biermanski <lars.biermanski@efs-auto.de>
Subject: Re: [Qemu-devel] [PATCH 3/5] tricore: fix RRPW_INSERT instruction
Date: Wed, 5 Jun 2019 16:34:51 +0200 [thread overview]
Message-ID: <ffb4ba2c-318e-6b08-c206-a90b000074d2@mail.uni-paderborn.de> (raw)
In-Reply-To: <20190605061126.10244-4-david.brenken@efs-auto.org>
Hi David,
On 6/5/19 8:11 AM, David Brenken wrote:
> From: David Brenken <david.brenken@efs-auto.de>
>
> Signed-off-by: Andreas Konopik <andreas.konopik@efs-auto.de>
> Signed-off-by: David Brenken <david.brenken@efs-auto.de>
> Signed-off-by: Georg Hofstetter <georg.hofstetter@efs-auto.de>
> Signed-off-by: Robert Rasche <robert.rasche@efs-auto.de>
> Signed-off-by: Lars Biermanski <lars.biermanski@efs-auto.de>
>
> ---
> target/tricore/translate.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/target/tricore/translate.c b/target/tricore/translate.c
> index a8b4de647a..19d8db7a46 100644
> --- a/target/tricore/translate.c
> +++ b/target/tricore/translate.c
> @@ -7004,6 +7004,7 @@ static void decode_rrpw_extract_insert(CPUTriCoreState *env, DisasContext *ctx)
> uint32_t op2;
> int r1, r2, r3;
> int32_t pos, width;
> + TCGv temp1, temp2;
>
> op2 = MASK_OP_RRPW_OP2(ctx->opcode);
> r1 = MASK_OP_RRPW_S1(ctx->opcode);
> @@ -7042,9 +7043,13 @@ static void decode_rrpw_extract_insert(CPUTriCoreState *env, DisasContext *ctx)
> }
> break;
> case OPC2_32_RRPW_INSERT:
> - if (pos + width <= 31) {
> - tcg_gen_deposit_tl(cpu_gpr_d[r3], cpu_gpr_d[r1], cpu_gpr_d[r2],
> - width, pos);
Can you explain the problem causing the bug? Deposit looks fine to me.
After reading the specs again, I agree that the check needs to be <= 32.
> + if (pos + width <= 32) {
> + temp1 = tcg_const_i32(pos); /* pos */
> + temp2 = tcg_const_i32(width); /* width */
Useless comments.
Cheers,
Bastian
next prev parent reply other threads:[~2019-06-05 14:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-05 6:11 [Qemu-devel] [PATCH 0/5] tricore: adding new instructions and fixing issues David Brenken
2019-06-05 6:11 ` [Qemu-devel] [PATCH 1/5] tricore: add FTOIZ instruction David Brenken
2019-06-05 14:27 ` Bastian Koppelmann
2019-06-05 6:11 ` [Qemu-devel] [PATCH 2/5] tricore: add UTOF instruction David Brenken
2019-06-05 14:34 ` Bastian Koppelmann
2019-06-05 6:11 ` [Qemu-devel] [PATCH 3/5] tricore: fix RRPW_INSERT instruction David Brenken
2019-06-05 14:34 ` Bastian Koppelmann [this message]
2019-06-06 7:26 ` Brenken, David (EFS-GH2)
2019-06-07 12:48 ` Richard Henderson
2019-06-12 5:48 ` Brenken, David (EFS-GH2)
2019-06-12 11:52 ` Bastian Koppelmann
2019-06-05 6:11 ` [Qemu-devel] [PATCH 4/5] tricore: add QSEED instruction David Brenken
2019-06-05 15:04 ` Bastian Koppelmann
2019-06-07 8:40 ` Konopik, Andreas (EFS-GH2)
2019-06-05 6:11 ` [Qemu-devel] [PATCH 5/5] tricore: reset DisasContext before generating code David Brenken
2019-06-05 9:01 ` Bastian Koppelmann
2019-06-06 11:44 ` Hofstetter, Georg (EFS-GH2)
2019-06-06 14:24 ` Bastian Koppelmann
2019-06-05 15:10 ` [Qemu-devel] [PATCH 0/5] tricore: adding new instructions and fixing issues Bastian Koppelmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ffb4ba2c-318e-6b08-c206-a90b000074d2@mail.uni-paderborn.de \
--to=kbastian@mail.uni-paderborn.de \
--cc=andreas.konopik@efs-auto.de \
--cc=david.brenken@efs-auto.de \
--cc=david.brenken@efs-auto.org \
--cc=georg.hofstetter@efs-auto.de \
--cc=lars.biermanski@efs-auto.de \
--cc=qemu-devel@nongnu.org \
--cc=robert.rasche@efs-auto.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).