qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Desnogues <laurent.desnogues@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Fix qemu_ld64 on arm
Date: Tue, 24 Feb 2009 09:27:30 +0100	[thread overview]
Message-ID: <761ea48b0902240027k45a6b687o3d1367957a849d00@mail.gmail.com> (raw)
In-Reply-To: <49A3A9EA.4040300@nomovok.com>

On Tue, Feb 24, 2009 at 9:03 AM, Pablo Virolainen
<Pablo.Virolainen@nomovok.com> wrote:
>
> Emulating fldl on arm doesn't seem to work too well. It's the way qemu_ld64
> is translated to arm instructions.
>
>        tcg_out_ld32_12(s, COND_AL, data_reg, addr_reg, 0);
>        tcg_out_ld32_12(s, COND_AL, data_reg2, addr_reg, 4);

It seems you are using an old version of qemu.  Taking a quick
look at current svn, I think your patch is not needed anymore.


Laurent

>
>
> Consider case where data_reg==0, data_reg2==1, and addr_reg==0. First load
> overwrited addr_reg. So let's put an if (data_ref==addr_reg).
>
> Index: tcg-target.c
> ===================================================================
> --- tcg-target.c        (revision 6642)
> +++ tcg-target.c        (working copy)
> @@ -1011,8 +1011,14 @@
>     case 3:
>         /* TODO: use block load -
>          * check that data_reg2 > data_reg or the other way */
> -        tcg_out_ld32_12(s, COND_AL, data_reg, addr_reg, 0);
> -        tcg_out_ld32_12(s, COND_AL, data_reg2, addr_reg, 4);
> +
> +        if (data_reg==addr_reg) {
> +            tcg_out_ld32_12(s, COND_AL, data_reg2, addr_reg, 4);
> +            tcg_out_ld32_12(s, COND_AL, data_reg, addr_reg, 0);
> +        } else {
> +            tcg_out_ld32_12(s, COND_AL, data_reg, addr_reg, 0);
> +            tcg_out_ld32_12(s, COND_AL, data_reg2, addr_reg, 4);
> +        }
>         break;
>     }
>  #endif
>
>
>

  reply	other threads:[~2009-02-24  8:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-24  8:03 [Qemu-devel] [PATCH] Fix qemu_ld64 on arm Pablo Virolainen
2009-02-24  8:27 ` Laurent Desnogues [this message]
2009-02-24  8:44   ` Pablo Virolainen
2009-02-24  8:57     ` Laurent Desnogues
2009-03-10 21:44 ` Aurelien Jarno

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=761ea48b0902240027k45a6b687o3d1367957a849d00@mail.gmail.com \
    --to=laurent.desnogues@gmail.com \
    --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).