From: DJ Delorie Date: Tue, 14 Dec 2010 23:12:20 +0000 (+0000) Subject: * rx.c (decode_opcode): For "MVFC PC,", use the address of the X-Git-Tag: cgen-snapshot-20110101~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=29cfc22f891b09394ff485fe18c2e2f0c3c80b0f;p=thirdparty%2Fbinutils-gdb.git * rx.c (decode_opcode): For "MVFC PC,", use the address of the opcode, not the address following the opcode. --- diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog index 16678f86242..c0b4b5dda64 100644 --- a/sim/rx/ChangeLog +++ b/sim/rx/ChangeLog @@ -1,3 +1,8 @@ +2010-12-14 DJ Delorie + + * rx.c (decode_opcode): For "MVFC PC,", use the address of the + opcode, not the address following the opcode. + 2010-11-11 DJ Delorie * rx.c (lsb_count): New. diff --git a/sim/rx/rx.c b/sim/rx/rx.c index 881dc66fa2c..5fb11d9f8c7 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 */) {