+/* Prepare a cpu for running.
+ MAX_INSNS is the number of insns to execute per time slice.
+ If 0 it means the cpu can run as long as it wants (e.g. until the
+ program completes).
+ ??? Perhaps this should be an argument to the engine_fn. */
+
+static void
+prime_cpu (SIM_CPU *cpu, int max_insns)
+{
+ CPU_MAX_SLICE_INSNS (cpu) = max_insns;
+ CPU_INSN_COUNT (cpu) = 0;
+
+ /* Initialize the insn descriptor table.
+ This has to be done after all initialization so we just defer it to
+ here. */
+
+ if (MACH_PREPARE_RUN (CPU_MACH (cpu)))
+ (* MACH_PREPARE_RUN (CPU_MACH (cpu))) (cpu);
+}
+
+/* Main loop, for 1 cpu. */
+