[rx] sim MVFC PC,reg fix
DJ Delorie
dj@redhat.com
Tue Dec 14 23:39:00 GMT 2010
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
More information about the Gdb-patches
mailing list