From: Pablo Virolainen <Pablo.Virolainen@nomovok.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Fix qemu_ld64 on arm
Date: Tue, 24 Feb 2009 10:03:54 +0200 [thread overview]
Message-ID: <49A3A9EA.4040300@nomovok.com> (raw)
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).
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
next reply other threads:[~2009-02-24 8:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-24 8:03 Pablo Virolainen [this message]
2009-02-24 8:27 ` [Qemu-devel] [PATCH] Fix qemu_ld64 on arm Laurent Desnogues
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=49A3A9EA.4040300@nomovok.com \
--to=pablo.virolainen@nomovok.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.