aboutsummaryrefslogtreecommitdiff
path: root/sim/tic80/interp.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1997-05-13 13:57:49 +0000
committerAndrew Cagney <cagney@redhat.com>1997-05-13 13:57:49 +0000
commit8490235019dde8d3b838f3b7f6666ca0eca63911 (patch)
treeb84b555e14da65824920dba1b9c9a5e2547ed049 /sim/tic80/interp.c
parent1a7f2a866ea638dce6bbac83a4f5fcd686f51795 (diff)
downloadgdb-8490235019dde8d3b838f3b7f6666ca0eca63911.zip
gdb-8490235019dde8d3b838f3b7f6666ca0eca63911.tar.gz
gdb-8490235019dde8d3b838f3b7f6666ca0eca63911.tar.bz2
Remove ANNULed cycle - was confusing gdb.
Diffstat (limited to 'sim/tic80/interp.c')
-rw-r--r--sim/tic80/interp.c27
1 files changed, 5 insertions, 22 deletions
diff --git a/sim/tic80/interp.c b/sim/tic80/interp.c
index 072b9be..24cfad1 100644
--- a/sim/tic80/interp.c
+++ b/sim/tic80/interp.c
@@ -113,17 +113,8 @@ engine_run_until_stop (SIM_DESC sd,
cia = cpu->cia;
do
{
- if (cia.ip == -1)
- {
- /* anulled instruction */
- cia.ip = cia.dp;
- cia.dp = cia.dp + sizeof (instruction_word);
- }
- else
- {
- instruction_word insn = IMEM (cia.ip);
- cia = idecode_issue (sd, insn, cia);
- }
+ instruction_word insn = IMEM (cia);
+ cia = idecode_issue (sd, insn, cia);
}
while (*keep_running);
engine_halt (sd, cpu, cia, sim_stopped, SIGINT);
@@ -137,22 +128,14 @@ engine_step (SIM_DESC sd)
if (!setjmp (sd->path_to_halt))
{
instruction_address cia;
+ instruction_word insn;
sim_cpu *cpu = STATE_CPU (sd, 0);
sd->halt_ok = 1;
setjmp (sd->path_to_restart);
sd->restart_ok = 1;
cia = cpu->cia;
- if (cia.ip == -1)
- {
- /* anulled instruction */
- cia.ip = cia.dp;
- cia.dp = cia.dp + sizeof (instruction_word);
- }
- else
- {
- instruction_word insn = IMEM (cia.ip);
- cia = idecode_issue (sd, insn, cia);
- }
+ insn = IMEM (cia);
+ cia = idecode_issue (sd, insn, cia);
engine_halt (sd, cpu, cia, sim_stopped, SIGTRAP);
}
}