This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[rx] sim MVFC PC,reg fix


Applied.

	(decode_opcode): RXO_branchrel is relative to the opcode's PC, not
	the address following the opcode.
 
Index: rx.c
===================================================================
RCS file: /cvs/src/src/sim/rx/rx.c,v
retrieving revision 1.12
diff -p -U3 -r1.12  rx.c
--- rx.c	14 Dec 2010 23:12:20 -0000	1.12
+++ rx.c	14 Dec 2010 23:38:08 -0000
@@ -1087,10 +1087,10 @@ decode_opcode ()
       break;
 
     case RXO_branchrel:
-      if (GS())
+      if (opcode->op[1].type == RX_Operand_None || GS())
 	{
 	  int delta = GD();
-	  regs.r_pc += delta;
+	  regs.r_pc = opcode_pc + delta;
 #ifdef CYCLE_ACCURATE
 	  /* Note: specs say 3, chip says 2.  */
 	  if (delta >= 0 && delta < 16


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]