--- trunk/src/cpus/cpu_i960.c 2007/10/08 16:19:56 24 +++ trunk/src/cpus/cpu_i960.c 2007/10/08 16:20:58 32 @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * - * $Id: cpu_i960.c,v 1.9 2006/06/16 18:31:25 debug Exp $ + * $Id: cpu_i960.c,v 1.12 2006/09/19 10:50:08 debug Exp $ * * Intel i960 CPU emulation. */ @@ -39,6 +39,7 @@ #include "machine.h" #include "memory.h" #include "misc.h" +#include "settings.h" #include "symbol.h" #define DYNTRANS_32 @@ -60,6 +61,7 @@ if (strcasecmp(cpu_type_name, "i960") != 0) return 0; + cpu->run_instr = i960_run_instr; cpu->memory_rw = i960_memory_rw; cpu->update_translation_table = i960_update_translation_table; cpu->invalidate_translation_caches = @@ -74,6 +76,9 @@ debug("%s", cpu->name); } + /* Add all register names to the settings: */ + CPU_SETTINGS_ADD_REGISTER64("pc", cpu->pc); + return 1; } @@ -119,34 +124,11 @@ symbol = get_symbol_name(&cpu->machine->symbol_context, cpu->pc, &offset); - debug("cpu%i: pc = 0x%08x", x, (int)cpu->pc); + debug("cpu%i: pc = 0x%08"PRIx32, x, (uint32_t)cpu->pc); debug(" <%s>\n", symbol != NULL? symbol : " no symbol "); } } - -/* - * i960_cpu_register_match(): - */ -void i960_cpu_register_match(struct machine *m, char *name, - int writeflag, uint64_t *valuep, int *match_register) -{ - int cpunr = 0; - - /* CPU number: */ - - /* TODO */ - - /* Register name: */ - if (strcasecmp(name, "pc") == 0) { - if (writeflag) { - m->cpus[cpunr]->pc = *valuep; - } else - *valuep = m->cpus[cpunr]->pc; - *match_register = 1; - } -} - /* * i960_cpu_tlbdump():