/[gxemul]/trunk/src/cpus/cpu_sh.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/cpus/cpu_sh.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 22 by dpavlin, Mon Oct 8 16:19:37 2007 UTC revision 26 by dpavlin, Mon Oct 8 16:20:10 2007 UTC
# Line 1  Line 1 
1  /*  /*
2   *  Copyright (C) 2005  Anders Gavare.  All rights reserved.   *  Copyright (C) 2005-2006  Anders Gavare.  All rights reserved.
3   *   *
4   *  Redistribution and use in source and binary forms, with or without   *  Redistribution and use in source and binary forms, with or without
5   *  modification, are permitted provided that the following conditions are met:   *  modification, are permitted provided that the following conditions are met:
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *   *
27   *   *
28   *  $Id: cpu_sh.c,v 1.9 2006/02/17 18:38:30 debug Exp $   *  $Id: cpu_sh.c,v 1.16 2006/06/24 21:47:23 debug Exp $
29   *   *
30   *  Hitachi SuperH ("SH") CPU emulation.   *  Hitachi SuperH ("SH") CPU emulation.
31   *   *
# Line 192  void sh_cpu_register_match(struct machin Line 192  void sh_cpu_register_match(struct machin
192    
193    
194  /*  /*
195     *  sh_cpu_tlbdump():
196     *
197     *  Called from the debugger to dump the TLB in a readable format.
198     *  x is the cpu number to dump, or -1 to dump all CPUs.
199     *
200     *  If rawflag is nonzero, then the TLB contents isn't formated nicely,
201     *  just dumped.
202     */
203    void sh_cpu_tlbdump(struct machine *m, int x, int rawflag)
204    {
205    }
206    
207    
208    /*
209     *  sh_cpu_gdb_stub():
210     *
211     *  Execute a "remote GDB" command. Returns a newly allocated response string
212     *  on success, NULL on failure.
213     */
214    char *sh_cpu_gdb_stub(struct cpu *cpu, char *cmd)
215    {
216            fatal("sh_cpu_gdb_stub(): TODO\n");
217            return NULL;
218    }
219    
220    
221    /*
222   *  sh_cpu_interrupt():   *  sh_cpu_interrupt():
223   */   */
224  int sh_cpu_interrupt(struct cpu *cpu, uint64_t irq_nr)  int sh_cpu_interrupt(struct cpu *cpu, uint64_t irq_nr)
# Line 219  int sh_cpu_interrupt_ack(struct cpu *cpu Line 246  int sh_cpu_interrupt_ack(struct cpu *cpu
246   *  lowest 4 or 8 bits then select sub-opcode.   *  lowest 4 or 8 bits then select sub-opcode.
247   */   */
248  int sh_cpu_disassemble_instr_compact(struct cpu *cpu, unsigned char *instr,  int sh_cpu_disassemble_instr_compact(struct cpu *cpu, unsigned char *instr,
249          int running, uint64_t dumpaddr, int bintrans)          int running, uint64_t dumpaddr)
250  {  {
251          uint64_t addr;          uint64_t addr;
252          uint16_t iword;          uint16_t iword;
# Line 542  int sh_cpu_disassemble_instr_compact(str Line 569  int sh_cpu_disassemble_instr_compact(str
569   *  cpu->pc for relative addresses.   *  cpu->pc for relative addresses.
570   */   */
571  int sh_cpu_disassemble_instr(struct cpu *cpu, unsigned char *instr,  int sh_cpu_disassemble_instr(struct cpu *cpu, unsigned char *instr,
572          int running, uint64_t dumpaddr, int bintrans)          int running, uint64_t dumpaddr)
573  {  {
574          uint64_t offset;          uint64_t offset;
575          uint32_t iword;          uint32_t iword;
# Line 566  int sh_cpu_disassemble_instr(struct cpu Line 593  int sh_cpu_disassemble_instr(struct cpu
593    
594          if (cpu->cd.sh.compact)          if (cpu->cd.sh.compact)
595                  return sh_cpu_disassemble_instr_compact(cpu, instr,                  return sh_cpu_disassemble_instr_compact(cpu, instr,
596                      running, dumpaddr, bintrans);                      running, dumpaddr);
597    
598          if (cpu->byte_order == EMUL_BIG_ENDIAN)          if (cpu->byte_order == EMUL_BIG_ENDIAN)
599                  iword = (instr[0] << 24) + (instr[1] << 16) + (instr[2] << 8)                  iword = (instr[0] << 24) + (instr[1] << 16) + (instr[2] << 8)

Legend:
Removed from v.22  
changed lines
  Added in v.26

  ViewVC Help
Powered by ViewVC 1.1.26