qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>,
	qemu-devel@nongnu.org
Cc: david.brenken@efs-auto.de
Subject: Re: [Qemu-devel] [PATCH 3/3] target/tricore: Use translate_loop
Date: Mon, 17 Jun 2019 09:51:05 -0700	[thread overview]
Message-ID: <f20e8434-f716-85df-faa0-5447fec6fdf0@linaro.org> (raw)
In-Reply-To: <20190617143533.15013-4-kbastian@mail.uni-paderborn.de>

On 6/17/19 7:35 AM, Bastian Koppelmann wrote:
> +static void tricore_tr_translate_insn(DisasContextBase *dcbase, CPUState *cpu)
> +{
> +    DisasContext *ctx = container_of(dcbase, DisasContext, base);
> +    CPUTriCoreState *env = cpu->env_ptr;
> +
> +    ctx->opcode = cpu_ldl_code(env, ctx->base.pc_next);
> +    decode_opc(ctx);

I'll note that there's an existing bug here, always reading 4 bytes with ldl.
You need to load 2 bytes, look at the low bit as in decode_opc.  If 16-bit,
read nothing more; if 32-bit, read 2 more bytes.


r~


  parent reply	other threads:[~2019-06-17 16:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-17 14:35 [Qemu-devel] [PATCH 0/3] tricore: Convert to translate_loop Bastian Koppelmann
2019-06-17 14:35 ` [Qemu-devel] [PATCH 1/3] target/tricore: Use DisasContextBase API Bastian Koppelmann
2019-06-17 16:06   ` Richard Henderson
2019-06-17 14:35 ` [Qemu-devel] [PATCH 2/3] target-tricore: Make env a member of DisasContext Bastian Koppelmann
2019-06-17 16:11   ` Richard Henderson
2019-06-17 14:35 ` [Qemu-devel] [PATCH 3/3] target/tricore: Use translate_loop Bastian Koppelmann
2019-06-17 16:45   ` Richard Henderson
2019-06-18 12:06     ` Bastian Koppelmann
2019-06-18 14:28       ` Richard Henderson
2019-06-17 16:51   ` Richard Henderson [this message]
2019-06-17 19:07 ` [Qemu-devel] [PATCH 0/3] tricore: Convert to translate_loop no-reply

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=f20e8434-f716-85df-faa0-5447fec6fdf0@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=david.brenken@efs-auto.de \
    --cc=kbastian@mail.uni-paderborn.de \
    --cc=qemu-devel@nongnu.org \
    /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).