* rx/rx.c (decode_opcode): fix SWHILE logic.
authorDJ Delorie <dj@redhat.com>
Mon, 30 Nov 2009 23:37:39 +0000 (23:37 +0000)
committerDJ Delorie <dj@redhat.com>
Mon, 30 Nov 2009 23:37:39 +0000 (23:37 +0000)
sim/rx/ChangeLog
sim/rx/rx.c

index 8f103df049e369a03521c798ac1222d9cd94d670..67b89589524094663c9bb3d70a066887816e2635 100644 (file)
@@ -1,3 +1,7 @@
+2009-11-30  DJ Delorie  <dj@redhat.com>
+
+       * rx/rx.c (decode_opcode): fix SWHILE logic.
+
 2009-10-27  DJ Delorie  <dj@redhat.com>
            Kevin Buettner <kevinb@redhat.com>
 
index 888aa862cc70c6b68a6ae0cfbb10671d997ddeb8..68329e24370362aeadd3766a90120e7c1994fb38 100644 (file)
@@ -1385,9 +1385,9 @@ decode_opcode ()
            {
              regs.r[3] --;
              umb = mem_get_si (get_reg (1));
+             regs.r[1] += 4;
              if (umb != uma)
                break;
-             regs.r[1] += 4;
            }
          break;
        case RX_Word:
@@ -1396,9 +1396,9 @@ decode_opcode ()
            {
              regs.r[3] --;
              umb = mem_get_hi (get_reg (1));
+             regs.r[1] += 2;
              if (umb != uma)
                break;
-             regs.r[1] += 2;
            }
          break;
        case RX_Byte:
@@ -1407,9 +1407,9 @@ decode_opcode ()
            {
              regs.r[3] --;
              umb = mem_get_qi (regs.r[1]);
+             regs.r[1] += 1;
              if (umb != uma)
                break;
-             regs.r[1] += 1;
            }
          break;
        default: