--- trunk/src/emul.c 2007/10/08 16:19:11 18 +++ trunk/src/emul.c 2007/10/08 16:19:23 20 @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * - * $Id: emul.c,v 1.235 2005/10/26 14:37:02 debug Exp $ + * $Id: emul.c,v 1.238 2005/11/19 18:53:06 debug Exp $ * * Emulation startup and misc. routines. */ @@ -112,11 +112,14 @@ * were automatically converted into the correct address. */ - if ((dp >> 32) == 0 && ((dp >> 31) & 1)) - dp |= 0xffffffff00000000ULL; + if (m->arch == ARCH_MIPS) { + if ((dp >> 32) == 0 && ((dp >> 31) & 1)) + dp |= 0xffffffff00000000ULL; + } + m->breakpoint_addr[i] = dp; - debug("breakpoint %i: 0x%016llx", i, (long long)dp); + debug("breakpoint %i: 0x%llx", i, (long long)dp); if (string_flag) debug(" (%s)", m->breakpoint_string[i]); debug("\n"); @@ -1215,8 +1218,11 @@ break; case ARCH_ARM: + if (cpu->pc & 3) { + fatal("ARM: lowest bits of pc set: TODO\n"); + exit(1); + } cpu->pc &= 0xfffffffc; - cpu->cd.arm.r[ARM_PC] = cpu->pc; break; case ARCH_AVR: @@ -1240,8 +1246,7 @@ break; case ARCH_MIPS: - if ((cpu->pc >> 32) == 0 - && (cpu->pc & 0x80000000ULL)) + if ((cpu->pc >> 32) == 0 && (cpu->pc & 0x80000000ULL)) cpu->pc |= 0xffffffff00000000ULL; cpu->cd.mips.gpr[MIPS_GPR_GP] = gp; @@ -1352,6 +1357,15 @@ m->machine_type == MACHINE_SGI) && m->prom_emulation) add_arc_components(m); + +#if 0 +if (m->machine_type == MACHINE_IQ80321) { + store_32bit_word(cpu, 0xc0200000, 0); + store_32bit_word(cpu, 0xc0200004, 0xd0000000); +} +#endif + + debug("starting cpu%i at ", m->bootstrap_cpu); switch (m->arch) {