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:39:07 -0500
- Subject: [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