From: Lauro Ramos Venancio <lauro.venancio@indt.org.br>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] qemu-arm: wrong execution of post-indexed loads when Rm and Rd are the same register
Date: Fri, 16 Mar 2007 17:42:42 -0300 [thread overview]
Message-ID: <1174077762.5181.5.camel@edgy-laptop> (raw)
In-Reply-To: <200703152204.41337.paul@codesourcery.com>
[-- Attachment #1: Type: text/plain, Size: 88 bytes --]
I'm sending a new version of the patch that uses Base Restored data
abort model.
Lauro
[-- Attachment #2: 00_ldr_writeback.patch --]
[-- Type: text/x-patch, Size: 2010 bytes --]
diff -ru qemu-0.9.0.orig/target-arm/translate.c qemu-0.9.0/target-arm/translate.c
--- qemu-0.9.0.orig/target-arm/translate.c 2007-03-16 11:41:28.000000000 -0300
+++ qemu-0.9.0/target-arm/translate.c 2007-03-16 14:59:40.000000000 -0300
@@ -1556,7 +1556,6 @@
gen_ldst(ldsw, s);
break;
}
- gen_movl_reg_T0(s, rd);
} else if (sh & 2) {
/* doubleword */
if (sh & 1) {
@@ -1572,7 +1571,7 @@
gen_movl_reg_T0(s, rd);
gen_op_addl_T1_im(4);
gen_ldst(ldl, s);
- gen_movl_reg_T0(s, rd + 1);
+ ++rd;
}
address_offset = -4;
} else {
@@ -1588,6 +1587,12 @@
gen_op_addl_T1_im(address_offset);
gen_movl_reg_T1(s, rn);
}
+
+ if ((insn & (1 << 20)) ||
+ ((!(insn & (1 << 20)))&&((sh & 3) == 2))) {
+ /* load */
+ gen_movl_reg_T0(s, rd);
+ }
}
break;
case 0x4:
@@ -1630,10 +1635,6 @@
gen_op_ldl_kernel();
}
#endif
- if (rd == 15)
- gen_bx(s);
- else
- gen_movl_reg_T0(s, rd);
} else {
/* store */
gen_movl_T0_reg(s, rd);
@@ -1662,6 +1663,13 @@
} else if (insn & (1 << 21))
gen_movl_reg_T1(s, rn); {
}
+ if (insn & (1 << 20)) {
+ /* load */
+ if (rd == 15)
+ gen_bx(s);
+ else
+ gen_movl_reg_T0(s, rd);
+ }
break;
case 0x08:
case 0x09:
Only in qemu-0.9.0/target-arm: translate.c~
prev parent reply other threads:[~2007-03-16 20:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-15 19:35 [Qemu-devel] qemu-arm: wrong execution of post-indexed loads when Rm and Rd are the same register Lauro Ramos Venancio
2007-03-15 19:43 ` [Qemu-devel] " Lauro Ramos Venancio
2007-03-15 20:03 ` [Qemu-devel] " Paul Brook
2007-03-15 20:32 ` Rodrigo Vivi
2007-03-15 21:10 ` Paul Brook
2007-03-15 21:19 ` Rodrigo Vivi
2007-03-15 21:55 ` Laurent Desnogues
2007-03-15 22:04 ` Paul Brook
2007-03-16 20:42 ` Lauro Ramos Venancio [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=1174077762.5181.5.camel@edgy-laptop \
--to=lauro.venancio@indt.org.br \
--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).