/[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 24 by dpavlin, Mon Oct 8 16:19:56 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.15 2006/06/16 18:31:26 debug Exp $
29   *   *
30   *  Hitachi SuperH ("SH") CPU emulation.   *  Hitachi SuperH ("SH") CPU emulation.
31   *   *
# Line 89  int sh_cpu_new(struct cpu *cpu, struct m Line 89  int sh_cpu_new(struct cpu *cpu, struct m
89                  debug("%s", cpu->name);                  debug("%s", cpu->name);
90          }          }
91    
92            sh_init_64bit_dummy_tables(cpu);
93    
94          return 1;          return 1;
95  }  }
96    
# Line 192  void sh_cpu_register_match(struct machin Line 194  void sh_cpu_register_match(struct machin
194    
195    
196  /*  /*
197     *  sh_cpu_tlbdump():
198     *
199     *  Called from the debugger to dump the TLB in a readable format.
200     *  x is the cpu number to dump, or -1 to dump all CPUs.
201     *
202     *  If rawflag is nonzero, then the TLB contents isn't formated nicely,
203     *  just dumped.
204     */
205    void sh_cpu_tlbdump(struct machine *m, int x, int rawflag)
206    {
207    }
208    
209    
210    /*
211     *  sh_cpu_gdb_stub():
212     *
213     *  Execute a "remote GDB" command. Returns a newly allocated response string
214     *  on success, NULL on failure.
215     */
216    char *sh_cpu_gdb_stub(struct cpu *cpu, char *cmd)
217    {
218            fatal("sh_cpu_gdb_stub(): TODO\n");
219            return NULL;
220    }
221    
222    
223    /*
224   *  sh_cpu_interrupt():   *  sh_cpu_interrupt():
225   */   */
226  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 248  int sh_cpu_interrupt_ack(struct cpu *cpu
248   *  lowest 4 or 8 bits then select sub-opcode.   *  lowest 4 or 8 bits then select sub-opcode.
249   */   */
250  int sh_cpu_disassemble_instr_compact(struct cpu *cpu, unsigned char *instr,  int sh_cpu_disassemble_instr_compact(struct cpu *cpu, unsigned char *instr,
251          int running, uint64_t dumpaddr, int bintrans)          int running, uint64_t dumpaddr)
252  {  {
253          uint64_t addr;          uint64_t addr;
254          uint16_t iword;          uint16_t iword;
# Line 542  int sh_cpu_disassemble_instr_compact(str Line 571  int sh_cpu_disassemble_instr_compact(str
571   *  cpu->pc for relative addresses.   *  cpu->pc for relative addresses.
572   */   */
573  int sh_cpu_disassemble_instr(struct cpu *cpu, unsigned char *instr,  int sh_cpu_disassemble_instr(struct cpu *cpu, unsigned char *instr,
574          int running, uint64_t dumpaddr, int bintrans)          int running, uint64_t dumpaddr)
575  {  {
576          uint64_t offset;          uint64_t offset;
577          uint32_t iword;          uint32_t iword;
# Line 566  int sh_cpu_disassemble_instr(struct cpu Line 595  int sh_cpu_disassemble_instr(struct cpu
595    
596          if (cpu->cd.sh.compact)          if (cpu->cd.sh.compact)
597                  return sh_cpu_disassemble_instr_compact(cpu, instr,                  return sh_cpu_disassemble_instr_compact(cpu, instr,
598                      running, dumpaddr, bintrans);                      running, dumpaddr);
599    
600          if (cpu->byte_order == EMUL_BIG_ENDIAN)          if (cpu->byte_order == EMUL_BIG_ENDIAN)
601                  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.24

  ViewVC Help
Powered by ViewVC 1.1.26