From: Jason Wessel <jason.wessel@windriver.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] undefined instruction handling to fix for ARM
Date: Tue, 02 May 2006 15:19:27 -0500 [thread overview]
Message-ID: <4457BECF.5080804@windriver.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 412 bytes --]
After some significant debugging I found the problem with GDB on the
target side.
The instruction translation was not correctly executing undefined
instructions per section 3.13.1 of the ARM Architecture Reference
Manual. Using the attached patch, the target side GDB as well as kernel
side ptrace() with software breakpoints execute correctly and report
exceptions to the correct vector.
Thanks,
Jason.
[-- Attachment #2: undefined_instruction_handler_fix.patch --]
[-- Type: text/plain, Size: 1357 bytes --]
? .pc
? patches
Index: Changelog
===================================================================
RCS file: /sources/qemu/qemu/Changelog,v
retrieving revision 1.115
diff -u -r1.115 Changelog
--- Changelog 30 Apr 2006 21:28:35 -0000 1.115
+++ Changelog 2 May 2006 20:14:20 -0000
@@ -8,6 +8,8 @@
- Solaris port (Ben Taylor)
- Preliminary SH4 target (Samuel Tardieu)
- VNC server (Anthony Liguori)
+ - Fix undefined instruction handling
+ for gdb and soft stepping (Jason Wessel)
version 0.8.0:
Index: target-arm/translate.c
===================================================================
RCS file: /sources/qemu/qemu/target-arm/translate.c,v
retrieving revision 1.41
diff -u -r1.41 translate.c
--- target-arm/translate.c 9 Apr 2006 14:38:57 -0000 1.41
+++ target-arm/translate.c 2 May 2006 20:14:20 -0000
@@ -1589,6 +1589,15 @@
case 0x5:
case 0x6:
case 0x7:
+ /* Check for undefined extension instructions
+ * per the ARM Bible IE:
+ * xxxx 0111 1111 xxxx xxxx xxxx 1111 xxxx
+ */
+ sh = (0xf << 20) | (0xf << 4);
+ if (op1 == 0x7 && ((insn & sh) == sh))
+ {
+ goto illegal_op;
+ }
/* load/store byte/word */
rn = (insn >> 16) & 0xf;
rd = (insn >> 12) & 0xf;
reply other threads:[~2006-05-02 20:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4457BECF.5080804@windriver.com \
--to=jason.wessel@windriver.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 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).