aboutsummaryrefslogtreecommitdiff
path: root/sim/rx/rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/rx/rx.c')
-rw-r--r--sim/rx/rx.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sim/rx/rx.c b/sim/rx/rx.c
index 881dc66..5fb11d9 100644
--- a/sim/rx/rx.c
+++ b/sim/rx/rx.c
@@ -1379,6 +1379,14 @@ decode_opcode ()
case RXO_mov:
v = GS ();
+ if (opcode->op[1].type == RX_Operand_Register
+ && opcode->op[1].reg == 17 /* PC */)
+ {
+ /* Special case. We want the address of the insn, not the
+ address of the next insn. */
+ v = opcode_pc;
+ }
+
if (opcode->op[0].type == RX_Operand_Register
&& opcode->op[0].reg == 16 /* PSW */)
{