From 117f2c0dc4943ad8d5a64b6aa3f7b8da9dc12ed4 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Mon, 30 Nov 2009 23:37:39 +0000 Subject: [PATCH] * rx/rx.c (decode_opcode): fix SWHILE logic. --- sim/rx/ChangeLog | 4 ++++ sim/rx/rx.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog index 8f103df049e..67b89589524 100644 --- a/sim/rx/ChangeLog +++ b/sim/rx/ChangeLog @@ -1,3 +1,7 @@ +2009-11-30 DJ Delorie + + * rx/rx.c (decode_opcode): fix SWHILE logic. + 2009-10-27 DJ Delorie Kevin Buettner diff --git a/sim/rx/rx.c b/sim/rx/rx.c index 888aa862cc7..68329e24370 100644 --- a/sim/rx/rx.c +++ b/sim/rx/rx.c @@ -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: -- 2.30.2