aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorAnthony Green <green@redhat.com>2010-02-03 10:28:19 +0000
committerAnthony Green <green@redhat.com>2010-02-03 10:28:19 +0000
commit32d49b7b49a5ef4fe65c6f619e3825870b072b14 (patch)
tree5cd4894f24a2df0a2b7d4d92d9d23e81be03c04b /sim
parent0d31c79dad789b6e82620d842e8ba8c5d71cde88 (diff)
downloadgdb-32d49b7b49a5ef4fe65c6f619e3825870b072b14.zip
gdb-32d49b7b49a5ef4fe65c6f619e3825870b072b14.tar.gz
gdb-32d49b7b49a5ef4fe65c6f619e3825870b072b14.tar.bz2
Fix nop insn for moxie
Diffstat (limited to 'sim')
-rw-r--r--sim/moxie/ChangeLog5
-rw-r--r--sim/moxie/interp.c26
2 files changed, 20 insertions, 11 deletions
diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog
index 00af8db..c2c1c65 100644
--- a/sim/moxie/ChangeLog
+++ b/sim/moxie/ChangeLog
@@ -1,3 +1,8 @@
+2010-02-03 Anthony Green <green@moxielogic.com>
+
+ * interp.c (sim_resume): nop is 0x0f, and 0x00 is an illegal
+ instruction.
+
2010-01-13 Anthony Green <green@moxielogic.com>
* interp.c (sim_open): Add period to end of sentence in comment.
diff --git a/sim/moxie/interp.c b/sim/moxie/interp.c
index cd1bbeb..a608416 100644
--- a/sim/moxie/interp.c
+++ b/sim/moxie/interp.c
@@ -414,7 +414,10 @@ sim_resume (sd, step, siggnal)
int opcode = inst >> 8;
switch (opcode)
{
- case 0x00: /* nop */
+ case 0x00: /* bad */
+ opc = opcode;
+ TRACE("SIGILL0");
+ cpu.asregs.exception = SIGILL;
break;
case 0x01: /* ldi.l (immediate) */
{
@@ -587,16 +590,17 @@ sim_resume (sd, step, siggnal)
cpu.asregs.cc = cc;
}
break;
- case 0x0f:
- case 0x10:
- case 0x11:
- case 0x12:
- case 0x13:
- case 0x14:
- case 0x15:
- case 0x16:
- case 0x17:
- case 0x18:
+ case 0x0f: /* nop */
+ break;
+ case 0x10: /* bad */
+ case 0x11: /* bad */
+ case 0x12: /* bad */
+ case 0x13: /* bad */
+ case 0x14: /* bad */
+ case 0x15: /* bad */
+ case 0x16: /* bad */
+ case 0x17: /* bad */
+ case 0x18: /* bad */
{
opc = opcode;
TRACE("SIGILL0");