--- trunk/src/cpus/cpu_sh.c 2007/10/08 16:19:11 18 +++ trunk/src/cpus/cpu_sh.c 2007/10/08 16:20:10 26 @@ -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_sh.c,v 1.7 2005/10/22 17:24:21 debug Exp $ + * $Id: cpu_sh.c,v 1.16 2006/06/24 21:47:23 debug Exp $ * * Hitachi SuperH ("SH") CPU emulation. * @@ -126,7 +126,7 @@ void sh_cpu_register_dump(struct cpu *cpu, int gprs, int coprocs) { char *symbol; - uint64_t offset, tmp; + uint64_t offset; int i, x = cpu->cpu_id, nregs = cpu->cd.sh.compact? 16 : 64; int bits32 = cpu->cd.sh.bits == 32; @@ -192,17 +192,6 @@ /* - * sh_cpu_show_full_statistics(): - * - * Show detailed statistics on opcode usage on each cpu. - */ -void sh_cpu_show_full_statistics(struct machine *m) -{ - fatal("sh_cpu_show_full_statistics(): TODO\n"); -} - - -/* * sh_cpu_tlbdump(): * * Called from the debugger to dump the TLB in a readable format. @@ -213,7 +202,19 @@ */ void sh_cpu_tlbdump(struct machine *m, int x, int rawflag) { - fatal("sh_cpu_tlbdump(): TODO\n"); +} + + +/* + * sh_cpu_gdb_stub(): + * + * Execute a "remote GDB" command. Returns a newly allocated response string + * on success, NULL on failure. + */ +char *sh_cpu_gdb_stub(struct cpu *cpu, char *cmd) +{ + fatal("sh_cpu_gdb_stub(): TODO\n"); + return NULL; } @@ -245,12 +246,11 @@ * lowest 4 or 8 bits then select sub-opcode. */ int sh_cpu_disassemble_instr_compact(struct cpu *cpu, unsigned char *instr, - int running, uint64_t dumpaddr, int bintrans) + int running, uint64_t dumpaddr) { - uint64_t offset, addr; + uint64_t addr; uint16_t iword; int hi4, lo4, lo8, r8, r4; - char *symbol, *mnem = "ERROR"; if (cpu->byte_order == EMUL_BIG_ENDIAN) iword = (instr[0] << 8) + instr[1]; @@ -569,12 +569,11 @@ * cpu->pc for relative addresses. */ int sh_cpu_disassemble_instr(struct cpu *cpu, unsigned char *instr, - int running, uint64_t dumpaddr, int bintrans) + int running, uint64_t dumpaddr) { - uint64_t offset, addr; + uint64_t offset; uint32_t iword; - int hi6; - char *symbol, *mnem = "ERROR"; + char *symbol; if (running) dumpaddr = cpu->pc; @@ -594,7 +593,7 @@ if (cpu->cd.sh.compact) return sh_cpu_disassemble_instr_compact(cpu, instr, - running, dumpaddr, bintrans); + running, dumpaddr); if (cpu->byte_order == EMUL_BIG_ENDIAN) iword = (instr[0] << 24) + (instr[1] << 16) + (instr[2] << 8)