--- trunk/src/cpus/cpu_hppa.c 2007/10/08 16:19:23 20 +++ trunk/src/cpus/cpu_hppa.c 2007/10/08 16:19:56 24 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005 Anders Gavare. All rights reserved. + * Copyright (C) 2005-2006 Anders Gavare. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * - * $Id: cpu_hppa.c,v 1.6 2005/11/17 21:26:06 debug Exp $ + * $Id: cpu_hppa.c,v 1.13 2006/06/16 18:31:25 debug Exp $ * * HP PA-RISC CPU emulation. * @@ -88,6 +88,8 @@ debug("%s", cpu->name); } + hppa_init_64bit_dummy_tables(cpu); + return 1; } @@ -136,9 +138,9 @@ debug("cpu%i: pc = 0x", x); if (bits32) - debug("%08x", (int)cpu->pc); + debug("%08"PRIx32, (uint32_t) cpu->pc); else - debug("%016llx", (long long)cpu->pc); + debug("%016"PRIx64, (uint64_t) cpu->pc); debug(" <%s>\n", symbol != NULL? symbol : " no symbol "); if (bits32) { @@ -146,8 +148,8 @@ for (i=0; icd.hppa.r[i]); + debug(" r%02i = 0x%08"PRIx32" ", i, + (uint32_t)cpu->cd.hppa.r[i]); if ((i % 4) == 3) debug("\n"); } @@ -157,8 +159,8 @@ int r = (i >> 1) + ((i & 1) << 4); if ((i % 2) == 0) debug("cpu%i:", x); - debug(" r%02i = 0x%016llx ", r, - (long long)cpu->cd.hppa.r[r]); + debug(" r%02i = 0x%016"PRIx64" ", r, + (uint64_t) cpu->cd.hppa.r[r]); if ((i % 2) == 1) debug("\n"); } @@ -191,6 +193,33 @@ /* + * hppa_cpu_tlbdump(): + * + * Called from the debugger to dump the TLB in a readable format. + * x is the cpu number to dump, or -1 to dump all CPUs. + * + * If rawflag is nonzero, then the TLB contents isn't formated nicely, + * just dumped. + */ +void hppa_cpu_tlbdump(struct machine *m, int x, int rawflag) +{ +} + + +/* + * hppa_cpu_gdb_stub(): + * + * Execute a "remote GDB" command. Returns a newly allocated response string + * on success, NULL on failure. + */ +char *hppa_cpu_gdb_stub(struct cpu *cpu, char *cmd) +{ + fatal("hppa_cpu_gdb_stub(): TODO\n"); + return NULL; +} + + +/* * hppa_cpu_interrupt(): */ int hppa_cpu_interrupt(struct cpu *cpu, uint64_t irq_nr) @@ -223,7 +252,7 @@ * cpu->pc for relative addresses. */ int hppa_cpu_disassemble_instr(struct cpu *cpu, unsigned char *instr, - int running, uint64_t dumpaddr, int bintrans) + int running, uint64_t dumpaddr) { uint64_t offset; uint32_t iword; @@ -241,9 +270,9 @@ debug("cpu%i: ", cpu->cpu_id); if (cpu->cd.hppa.bits == 32) - debug("%08x", (int)dumpaddr); + debug("%08"PRIx32, (uint32_t) dumpaddr); else - debug("%016llx", (long long)dumpaddr); + debug("%016"PRIx64, (uint64_t) dumpaddr); if (cpu->byte_order == EMUL_BIG_ENDIAN) iword = (instr[0] << 24) + (instr[1] << 16) + (instr[2] << 8) @@ -252,7 +281,7 @@ iword = (instr[3] << 24) + (instr[2] << 16) + (instr[1] << 8) + instr[0]; - debug(": %08x\t", iword); + debug(": %08"PRIx32"\t", (uint32_t) iword); /* * Decode the instruction: