aboutsummaryrefslogtreecommitdiff
path: root/sim/tic80/insns
diff options
context:
space:
mode:
authorMichael Meissner <gnu@the-meissners.org>1997-05-08 18:36:00 +0000
committerMichael Meissner <gnu@the-meissners.org>1997-05-08 18:36:00 +0000
commit53dcd669e504fb892aaca0b3c7a99aea559aac7a (patch)
treeec2c153e700308e069287b2c259a9e9902f195bb /sim/tic80/insns
parent30a05dbd8d69554f8954a56892fdf47570bcb0a1 (diff)
downloadgdb-53dcd669e504fb892aaca0b3c7a99aea559aac7a.zip
gdb-53dcd669e504fb892aaca0b3c7a99aea559aac7a.tar.gz
gdb-53dcd669e504fb892aaca0b3c7a99aea559aac7a.tar.bz2
Fix non-anulled calls so that return address is correct
Diffstat (limited to 'sim/tic80/insns')
-rw-r--r--sim/tic80/insns4
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/tic80/insns b/sim/tic80/insns
index 437b6c9..7c16213 100644
--- a/sim/tic80/insns
+++ b/sim/tic80/insns
@@ -230,7 +230,7 @@ instruction_address::function::do_bsr:instruction_address nia, signed32 *rLink,
nia.ip = -1;
}
else
- *rLink = cia.dp + sizeof (instruction_word);
+ *rLink = nia.ip + sizeof (instruction_word);
nia.dp = cia.ip + 4 * offset;
TRACE_UCOND_BR (MY_INDEX, nia.dp);
return nia;
@@ -614,7 +614,7 @@ instruction_address::function::do_jsr:instruction_address nia, signed32 *rLink,
nia.ip = -1;
}
else
- *rLink = cia.dp + sizeof (instruction_word);
+ *rLink = nia.ip + sizeof (instruction_word);
nia.dp = offset + base;
if (nia.dp & 0x3)
engine_error (SD, CPU, cia,