aboutsummaryrefslogtreecommitdiff
path: root/sim/rx
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2010-12-14 23:12:20 +0000
committerDJ Delorie <dj@redhat.com>2010-12-14 23:12:20 +0000
commit29cfc22f891b09394ff485fe18c2e2f0c3c80b0f (patch)
tree938b0335b948693063eb36808371e976db1a4e85 /sim/rx
parent4b2826e7db7e65a1587adfa96546e8869a6418b9 (diff)
downloadgdb-29cfc22f891b09394ff485fe18c2e2f0c3c80b0f.zip
gdb-29cfc22f891b09394ff485fe18c2e2f0c3c80b0f.tar.gz
gdb-29cfc22f891b09394ff485fe18c2e2f0c3c80b0f.tar.bz2
* rx.c (decode_opcode): For "MVFC PC,", use the address of the
opcode, not the address following the opcode.
Diffstat (limited to 'sim/rx')
-rw-r--r--sim/rx/ChangeLog5
-rw-r--r--sim/rx/rx.c8
2 files changed, 13 insertions, 0 deletions
diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog
index 16678f8..c0b4b5d 100644
--- a/sim/rx/ChangeLog
+++ b/sim/rx/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
2010-11-11 DJ Delorie <dj@redhat.com>
* rx.c (lsb_count): New.
diff --git a/sim/rx/rx.c b/sim/rx/rx.c
index 881dc66..5fb11d9 100644
--- a/sim/rx/rx.c
+++ b/sim/rx/rx.c
@@ -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 */)
{