From 29cfc22f891b09394ff485fe18c2e2f0c3c80b0f Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Tue, 14 Dec 2010 23:12:20 +0000 Subject: * rx.c (decode_opcode): For "MVFC PC,", use the address of the opcode, not the address following the opcode. --- sim/rx/rx.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sim/rx/rx.c') 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 */) { -- cgit v1.1