This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[rx] sim MVFC PC,reg fix
- From: DJ Delorie <dj at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 14 Dec 2010 18:12:23 -0500
- Subject: [rx] sim MVFC PC,reg fix
Applied.
2010-12-14 DJ Delorie <dj@redhat.com>
* rx.c (decode_opcode): For "MVFC PC,", use the address of the
opcode, not the address following the opcode.
Index: rx.c
===================================================================
RCS file: /cvs/src/src/sim/rx/rx.c,v
retrieving revision 1.11
diff -p -U3 -r1.11 rx.c
--- rx.c 12 Nov 2010 01:01:12 -0000 1.11
+++ rx.c 14 Dec 2010 23:11:35 -0000
@@ -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 */)
{