From: Michael Meissner Date: Thu, 8 May 1997 18:36:00 +0000 (+0000) Subject: Fix non-anulled calls so that return address is correct X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=53dcd669e504fb892aaca0b3c7a99aea559aac7a;p=binutils-gdb.git Fix non-anulled calls so that return address is correct --- diff --git a/sim/tic80/ChangeLog b/sim/tic80/ChangeLog index 51e676ab12d..4a458e428fb 100644 --- a/sim/tic80/ChangeLog +++ b/sim/tic80/ChangeLog @@ -1,5 +1,9 @@ Thu May 8 11:57:47 1997 Michael Meissner + * insns (jsr,bsr): For non-allulled calls, set r31 so that the + return address does not reexecute the instruction in the delay + slot. + * misc.c (tic80_trace_*): Change format slightly to accomidate real large decimal values. diff --git a/sim/tic80/insns b/sim/tic80/insns index 437b6c95b6f..7c16213a775 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,