[rx] sim MVFC PC,reg fix

DJ Delorie dj@redhat.com
Tue Dec 14 23:12:00 GMT 2010


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 */)
 	{



More information about the Gdb-patches mailing list