From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Fix qemu_ld64 on arm
Date: Tue, 10 Mar 2009 22:44:03 +0100 [thread overview]
Message-ID: <20090310214403.GC433@volta.aurel32.net> (raw)
In-Reply-To: <49A3A9EA.4040300@nomovok.com>
On Tue, Feb 24, 2009 at 10:03:54AM +0200, Pablo Virolainen 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);
>
>
> 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).
Thanks, applied.
> 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
>
>
>
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
prev parent reply other threads:[~2009-03-10 21:44 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
2009-02-24 8:44 ` Pablo Virolainen
2009-02-24 8:57 ` Laurent Desnogues
2009-03-10 21:44 ` Aurelien Jarno [this message]
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=20090310214403.GC433@volta.aurel32.net \
--to=aurelien@aurel32.net \
--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).