aboutsummaryrefslogtreecommitdiff
path: root/sim/aarch64
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2016-08-12 11:35:32 +0100
committerNick Clifton <nickc@redhat.com>2016-08-12 11:35:32 +0100
commitb14bdb3bab20db9d200d669dfb5e2eadde7b14cc (patch)
treefe7b64177c835dbdf5a6f89189239a3e44ab2a4e /sim/aarch64
parent7b17065f843252c27e8b9c093f78382079fe4d7f (diff)
downloadgdb-b14bdb3bab20db9d200d669dfb5e2eadde7b14cc.zip
gdb-b14bdb3bab20db9d200d669dfb5e2eadde7b14cc.tar.gz
gdb-b14bdb3bab20db9d200d669dfb5e2eadde7b14cc.tar.bz2
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.
Diffstat (limited to 'sim/aarch64')
-rw-r--r--sim/aarch64/ChangeLog10
-rw-r--r--sim/aarch64/simulator.c13
-rw-r--r--sim/aarch64/simulator.h5
3 files changed, 19 insertions, 9 deletions
diff --git a/sim/aarch64/ChangeLog b/sim/aarch64/ChangeLog
index d32a81b..c6d635c 100644
--- a/sim/aarch64/ChangeLog
+++ b/sim/aarch64/ChangeLog
@@ -1,3 +1,11 @@
+2016-08-12 Nick Clifton <nickc@redhat.com>
+
+ * 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.
+
2016-08-11 Nick Clifton <nickc@redhat.com>
* interp.c (sim_create_inferior): Allow for being called with a
@@ -5,6 +13,8 @@
with that start address.
* simulator.c (HALT_NYI): Just print out the numeric value of the
instruction when not tracing.
+ (aarch64_step): Change from static to global.
+ * simulator.h: Add a prototype for aarch64_step().
2016-07-27 Alan Modra <amodra@gmail.com>
diff --git a/sim/aarch64/simulator.c b/sim/aarch64/simulator.c
index 150bf34..67e61e7 100644
--- a/sim/aarch64/simulator.c
+++ b/sim/aarch64/simulator.c
@@ -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);
+
+ if (sim_events_tick (sd))
+ sim_events_process (sd);
+ }
- sim_engine_halt (sd, NULL, NULL, aarch64_get_PC (cpu),
- sim_exited, aarch64_get_reg_s32 (cpu, R0, SP_OK));
+ sim_engine_halt (sd, cpu, NULL, aarch64_get_PC (cpu),
+ sim_exited, aarch64_get_reg_s32 (cpu, R0, NO_SP));
}
void
diff --git a/sim/aarch64/simulator.h b/sim/aarch64/simulator.h
index a17bd21..128d242 100644
--- a/sim/aarch64/simulator.h
+++ b/sim/aarch64/simulator.h
@@ -46,11 +46,6 @@ extern void aarch64_init (sim_cpu *, uint64_t);
hit an error. */
extern void aarch64_run (SIM_DESC);
-
-/* Call this to execute one instruction at the current PC. */
-
-extern bfd_boolean aarch64_step (sim_cpu *);
-
extern const char * aarch64_get_func (uint64_t);
extern uint64_t aarch64_get_sym_value (const char *);
extern void aarch64_init_LIT_table (void);