From: David Morrison <dmorrison@invlim.com>
To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org, proljc@gmail.com,
peter.maydell@linaro.org
Cc: David Morrison <dmorrison@invlim.com>
Subject: [Qemu-devel] [PATCH] target-openrisc: bugfix for dec_sys to decode instructions correctly
Date: Mon, 5 Jan 2015 12:42:06 -0800 [thread overview]
Message-ID: <1420490526-6997-1-git-send-email-dmorrison@invlim.com> (raw)
Fixed the decoding of "system" instructions (starting with 0x2)
in dec_sys() in translate.c. In particular, the l.trap instruction
is now correctly decoded, which enables for singlestepping and
breakpoints to be set in GDB.
---
target-openrisc/translate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target-openrisc/translate.c b/target-openrisc/translate.c
index 407bd97..d36278f 100644
--- a/target-openrisc/translate.c
+++ b/target-openrisc/translate.c
@@ -1320,7 +1320,7 @@ static void dec_sys(DisasContext *dc, uint32_t insn)
#ifdef OPENRISC_DISAS
uint32_t K16;
#endif
- op0 = extract32(insn, 16, 8);
+ op0 = extract32(insn, 16, 10);
#ifdef OPENRISC_DISAS
K16 = extract32(insn, 0, 16);
#endif
--
2.2.1
next reply other threads:[~2015-01-05 20:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-05 20:42 David Morrison [this message]
2015-01-06 3:57 ` [Qemu-devel] [PATCH] target-openrisc: bugfix for dec_sys to decode instructions correctly Fam Zheng
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=1420490526-6997-1-git-send-email-dmorrison@invlim.com \
--to=dmorrison@invlim.com \
--cc=peter.maydell@linaro.org \
--cc=proljc@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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).