qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: ild ild <ild@inbox.ru>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] target-arm: modifying pc in tcg code for load/store multiple
Date: Thu, 19 Feb 2015 22:10:21 +0900	[thread overview]
Message-ID: <CAFEAcA8gMF3K8Ri2xt2dm2=4K3-LKxn-bvKNkJrDvf2gyHLx+w@mail.gmail.com> (raw)
In-Reply-To: <1424348812-4289-1-git-send-email-ild@inbox.ru>

On 19 February 2015 at 21:26,  <ild@inbox.ru> wrote:
> From: Ildar Isaev <ild@inbox.ru>
>
> pc wasn't modified in tcg code for load/store multiple,
> causing translation block to be executed in infinite loop forever
>
> Signed-off-by: Ildar Isaev <ild@inbox.ru>

It would be helpful if you gave an example of guest
code which we mishandle. Do you have a test case?

> ---
>  target-arm/translate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target-arm/translate.c b/target-arm/translate.c
> index 36868ed..622aa03 100644
> --- a/target-arm/translate.c
> +++ b/target-arm/translate.c
> @@ -8973,7 +8973,7 @@ static void disas_arm_insn(DisasContext *s, unsigned int insn)
>                      tmp = load_cpu_field(spsr);
>                      gen_set_cpsr(tmp, CPSR_ERET_MASK);
>                      tcg_temp_free_i32(tmp);
> -                    s->is_jmp = DISAS_UPDATE;
> +                    gen_lookup_tb(s);
>                  }
>              }
>              break;

This doesn't look right. What if the load-multiple loaded PC?
Calling gen_lookup_tb() will overwrite that.

-- PMM

  reply	other threads:[~2015-02-19 13:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-19 12:26 [Qemu-devel] [PATCH] target-arm: modifying pc in tcg code for load/store multiple ild
2015-02-19 13:10 ` Peter Maydell [this message]
2015-02-19 16:04   ` Ildar Isaev
2015-03-10 19:05     ` Peter Maydell

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='CAFEAcA8gMF3K8Ri2xt2dm2=4K3-LKxn-bvKNkJrDvf2gyHLx+w@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=ild@inbox.ru \
    --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).