aboutsummaryrefslogtreecommitdiff
path: root/sim/mn10300/simops.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1997-06-10 18:32:40 +0000
committerJeff Law <law@redhat.com>1997-06-10 18:32:40 +0000
commit0a8fa63cb87497b74f8e7c43d5e0cdb865336266 (patch)
tree4cb99c32e14f57ae5bfb580d1cd6d9781c4d133c /sim/mn10300/simops.c
parenta5f269e919bcf4c8a39076828ae591deffa96b46 (diff)
downloadgdb-0a8fa63cb87497b74f8e7c43d5e0cdb865336266.zip
gdb-0a8fa63cb87497b74f8e7c43d5e0cdb865336266.tar.gz
gdb-0a8fa63cb87497b74f8e7c43d5e0cdb865336266.tar.bz2
* simops.c: Fix return address computation for "call" instructions.
Diffstat (limited to 'sim/mn10300/simops.c')
-rw-r--r--sim/mn10300/simops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/mn10300/simops.c b/sim/mn10300/simops.c
index 8f86609..a913f4c 100644
--- a/sim/mn10300/simops.c
+++ b/sim/mn10300/simops.c
@@ -2535,7 +2535,7 @@ void OP_CD000000 (insn, extension)
unsigned long mask;
sp = State.regs[REG_SP];
- next_pc = State.regs[REG_PC] + 2;
+ next_pc = State.regs[REG_PC] + 5;
State.mem[sp] = next_pc & 0xff;
State.mem[sp+1] = (next_pc & 0xff00) >> 8;
State.mem[sp+2] = (next_pc & 0xff0000) >> 16;
@@ -2601,7 +2601,7 @@ void OP_DD000000 (insn, extension)
unsigned long mask;
sp = State.regs[REG_SP];
- next_pc = State.regs[REG_PC] + 2;
+ next_pc = State.regs[REG_PC] + 7;
State.mem[sp] = next_pc & 0xff;
State.mem[sp+1] = (next_pc & 0xff00) >> 8;
State.mem[sp+2] = (next_pc & 0xff0000) >> 16;