Undo the previous change to the aarch64 sim - exporting aarch64_step() - and instead make aarch64_run correctly process sim events.

* simulator.c (aarch64_step): Revert pervious delta.
	(aarch64_run): Call sim_events_tick after each
	instruction is simulated, and if necessary call
	sim_events_process.
	* simulator.h: Revert previous delta.
This commit is contained in:
Nick Clifton
2016-08-12 11:35:32 +01:00
parent 7b17065f84
commit b14bdb3bab
3 changed files with 19 additions and 9 deletions

View File

@@ -14072,7 +14072,7 @@ aarch64_decode_and_execute (sim_cpu *cpu, uint64_t pc)
}
}
bfd_boolean
static bfd_boolean
aarch64_step (sim_cpu *cpu)
{
uint64_t pc = aarch64_get_PC (cpu);
@@ -14102,10 +14102,15 @@ aarch64_run (SIM_DESC sd)
sim_cpu *cpu = STATE_CPU (sd, 0);
while (aarch64_step (cpu))
aarch64_update_PC (cpu);
{
aarch64_update_PC (cpu);
sim_engine_halt (sd, NULL, NULL, aarch64_get_PC (cpu),
sim_exited, aarch64_get_reg_s32 (cpu, R0, SP_OK));
if (sim_events_tick (sd))
sim_events_process (sd);
}
sim_engine_halt (sd, cpu, NULL, aarch64_get_PC (cpu),
sim_exited, aarch64_get_reg_s32 (cpu, R0, NO_SP));
}
void