From: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] ARM: ldrex/strex only valid v6
Date: Mon, 26 May 2008 09:54:53 +0200 [thread overview]
Message-ID: <20080526075453.GA6062@os.inf.tu-dresden.de> (raw)
In-Reply-To: <761ea48b0805250418w2801a9ecta06985c63e719f79@mail.gmail.com>
On Sun May 25, 2008 at 13:18:07 +0200, Laurent Desnogues wrote:
> On Sun, May 25, 2008 at 11:51 AM, Adam Lackorzynski
> <adam@os.inf.tu-dresden.de> wrote:
> >
> > ldrex and strex are only valid instructions for v6 and up.
>
> There are many other places in translate.c that deal with the various
> ldrex/strex instructions. Some are v6, some others are v6K, some
> are v6T2 and some are v7. Did you check all of them? :-)
No, that's just the one I stumbled upon. This should be better but I
probably didn't catch all of them.
Index: target-arm/translate.c
===================================================================
--- target-arm/translate.c (revision 4586)
+++ target-arm/translate.c (working copy)
@@ -6221,6 +6221,7 @@
rd = (insn >> 12) & 0xf;
if (insn & (1 << 23)) {
/* load/store exclusive */
+ ARCH(6);
gen_movl_T1_reg(s, rn);
addr = cpu_T[1];
if (insn & (1 << 20)) {
@@ -6973,6 +6974,7 @@
}
} else if ((insn & (1 << 23)) == 0) {
/* Load/store exclusive word. */
+ ARCH(6);
gen_movl_T1_reg(s, rn);
addr = cpu_T[1];
if (insn & (1 << 20)) {
@@ -7017,6 +7019,7 @@
/* ??? These are not really atomic. However we know
we never have multiple CPUs running in parallel,
so it is good enough. */
+ ARCH(6);
op = (insn >> 4) & 0x3;
/* Must use a global reg for the address because we have
a conditional branch in the store instruction. */
@@ -7070,6 +7073,7 @@
} else {
/* Load/store multiple, RFE, SRS. */
if (((insn >> 23) & 1) == ((insn >> 24) & 1)) {
+ ARCH(6);
/* Not available in user mode. */
if (IS_USER(s))
goto illegal_op;
Adam
--
Adam adam@os.inf.tu-dresden.de
Lackorzynski http://os.inf.tu-dresden.de/~adam/
prev parent reply other threads:[~2008-05-26 7:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-25 9:51 [Qemu-devel] [PATCH] ARM: ldrex/strex only valid v6 Adam Lackorzynski
2008-05-25 11:18 ` Laurent Desnogues
2008-05-26 7:54 ` Adam Lackorzynski [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=20080526075453.GA6062@os.inf.tu-dresden.de \
--to=adam@os.inf.tu-dresden.de \
--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).