Fix nop insn for moxie
authorAnthony Green <green@redhat.com>
Wed, 3 Feb 2010 10:28:19 +0000 (10:28 +0000)
committerAnthony Green <green@redhat.com>
Wed, 3 Feb 2010 10:28:19 +0000 (10:28 +0000)
sim/moxie/ChangeLog
sim/moxie/interp.c

index 00af8db69d83b69910189771da4dbe49d1455bce..c2c1c659fd42ead5575dd4b4c5b7f440cd3c6e55 100644 (file)
@@ -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.
index cd1bbeb73bb6a43f719fd2b78c344276497fabef..a608416eb4adc73e59efb4c4a4017c0ee34d1565 100644 (file)
@@ -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");
This page took 0.02592 seconds and 4 git commands to generate.