return 0;
}
+static sim_cia
+avr_pc_get (sim_cpu *cpu)
+{
+ return pc;
+}
+
+static void
+avr_pc_set (sim_cpu *cpu, sim_cia _pc)
+{
+ pc = _pc;
+}
+
static void
free_state (SIM_DESC sd)
{
SIM_DESC
sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, char **argv)
{
+ int i;
SIM_DESC sd = sim_state_alloc (kind, cb);
SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
return 0;
}
+ /* CPU specific initialization. */
+ for (i = 0; i < MAX_NR_PROCESSORS; ++i)
+ {
+ SIM_CPU *cpu = STATE_CPU (sd, i);
+
+ CPU_PC_FETCH (cpu) = avr_pc_get;
+ CPU_PC_STORE (cpu) = avr_pc_set;
+ }
+
/* Clear all the memory. */
memset (sram, 0, sizeof (sram));
memset (flash, 0, sizeof (flash));