diff options
author | DJ Delorie <dj@delorie.com> | 2010-12-14 23:39:03 +0000 |
---|---|---|
committer | DJ Delorie <dj@delorie.com> | 2010-12-14 23:39:03 +0000 |
commit | 87baf9c76d270004e5bce727862c62ee8f194b59 (patch) | |
tree | 91e4278c2d5202c691c74d951874847099d2918e /sim/rx/rx.c | |
parent | 37124605c17c958356b11b8ee98f39f0e9413514 (diff) | |
download | gdb-87baf9c76d270004e5bce727862c62ee8f194b59.tar.gz |
(decode_opcode): RXO_branchrel is relative to the opcode's PC, not
the address following the opcode.
Diffstat (limited to 'sim/rx/rx.c')
-rw-r--r-- | sim/rx/rx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/rx/rx.c b/sim/rx/rx.c index 5fb11d9f8c7..dd9bb8ef803 100644 --- a/sim/rx/rx.c +++ b/sim/rx/rx.c @@ -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 |