--- trunk/src/cpu.c 2007/10/08 16:20:03 25 +++ trunk/src/cpu.c 2007/10/08 16:20:10 26 @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * - * $Id: cpu.c,v 1.342 2006/06/22 13:27:03 debug Exp $ + * $Id: cpu.c,v 1.344 2006/06/24 21:47:22 debug Exp $ * * Common routines for CPU emulation. (Not specific to any CPU type.) */ @@ -96,15 +96,21 @@ "NULL\n"); exit(1); } - return cpu; + break; } } fp = fp->next; } - fatal("\ncpu_new(): unknown cpu type '%s'\n", cpu_type_name); - return NULL; + if (fp == NULL) { + fatal("\ncpu_new(): unknown cpu type '%s'\n", cpu_type_name); + return NULL; + } + + fp->init_tables(cpu); + + return cpu; } @@ -322,24 +328,6 @@ } -/* - * cpu_run(): - * - * Run instructions on all CPUs in this machine, for a "medium duration" - * (or until all CPUs have halted). - * - * Return value is 1 if anything happened, 0 if all CPUs are stopped. - */ -int cpu_run(struct emul *emul, struct machine *m) -{ - if (m->cpu_family == NULL || m->cpu_family->run == NULL) { - fatal("cpu_run(): NULL\n"); - return 0; - } else - return m->cpu_family->run(emul, m); -} - - /* * cpu_dumpinfo(): *