/[gxemul]/trunk/src/cpus/cpu_hppa.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_hppa.c

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

revision 19 by dpavlin, Mon Oct 8 16:19:11 2007 UTC revision 20 by dpavlin, Mon Oct 8 16:19:23 2007 UTC
# Line 15  Line 15 
15   *  THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND   *  THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16   *  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE   *  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17   *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE   *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18   *  ARE DISCLAIMED.  IN NO EVENT HPPAALL THE AUTHOR OR CONTRIBUTORS BE LIABLE     *  ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE  
19   *  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL   *  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20   *  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS   *  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21   *  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)   *  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *   *
27   *   *
28   *  $Id: cpu_hppa.c,v 1.2 2005/10/22 17:24:20 debug Exp $   *  $Id: cpu_hppa.c,v 1.6 2005/11/17 21:26:06 debug Exp $
29   *   *
30   *  HP PA-RISC CPU emulation.   *  HP PA-RISC CPU emulation.
31   *   *
# Line 83  int hppa_cpu_new(struct cpu *cpu, struct Line 83  int hppa_cpu_new(struct cpu *cpu, struct
83                      hppa_invalidate_code_translation;                      hppa_invalidate_code_translation;
84          }          }
85    
86          /*  Only hppaow name and caches etc for CPU nr 0 (in SMP machines):  */          /*  Only show name and caches etc for CPU nr 0 (in SMP machines):  */
87          if (cpu_id == 0) {          if (cpu_id == 0) {
88                  debug("%s", cpu->name);                  debug("%s", cpu->name);
89          }          }
# Line 125  void hppa_cpu_dumpinfo(struct cpu *cpu) Line 125  void hppa_cpu_dumpinfo(struct cpu *cpu)
125  void hppa_cpu_register_dump(struct cpu *cpu, int gprs, int coprocs)  void hppa_cpu_register_dump(struct cpu *cpu, int gprs, int coprocs)
126  {  {
127          char *symbol;          char *symbol;
128          uint64_t offset, tmp;          uint64_t offset;
129          int i, x = cpu->cpu_id, nregs = 32;          int i, x = cpu->cpu_id, nregs = 32;
130          int bits32 = cpu->cd.hppa.bits == 32;          int bits32 = cpu->cd.hppa.bits == 32;
131    
# Line 191  void hppa_cpu_register_match(struct mach Line 191  void hppa_cpu_register_match(struct mach
191    
192    
193  /*  /*
  *  hppa_cpu_show_full_statistics():  
  *  
  *  Show detailed statistics on opcode usage on each cpu.  
  */  
 void hppa_cpu_show_full_statistics(struct machine *m)  
 {  
         fatal("hppa_cpu_show_full_statistics(): TODO\n");  
 }  
   
   
 /*  
  *  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)  
 {  
         fatal("hppa_cpu_tlbdump(): TODO\n");  
 }  
   
   
 /*  
194   *  hppa_cpu_interrupt():   *  hppa_cpu_interrupt():
195   */   */
196  int hppa_cpu_interrupt(struct cpu *cpu, uint64_t irq_nr)  int hppa_cpu_interrupt(struct cpu *cpu, uint64_t irq_nr)
# Line 242  int hppa_cpu_interrupt_ack(struct cpu *c Line 216  int hppa_cpu_interrupt_ack(struct cpu *c
216   *  Convert an instruction word into human readable format, for instruction   *  Convert an instruction word into human readable format, for instruction
217   *  tracing.   *  tracing.
218   *   *
219   *  If running is 1, cpu->pc hppaould be the address of the instruction.   *  If running is 1, cpu->pc should be the address of the instruction.
220   *   *
221   *  If running is 0, things that depend on the runtime environment (eg.   *  If running is 0, things that depend on the runtime environment (eg.
222   *  register contents) will not be hppaown, and addr will be used instead of   *  register contents) will not be shown, and addr will be used instead of
223   *  cpu->pc for relative addresses.   *  cpu->pc for relative addresses.
224   */   */
225  int hppa_cpu_disassemble_instr(struct cpu *cpu, unsigned char *instr,  int hppa_cpu_disassemble_instr(struct cpu *cpu, unsigned char *instr,
226          int running, uint64_t dumpaddr, int bintrans)          int running, uint64_t dumpaddr, int bintrans)
227  {  {
228          uint64_t offset, addr;          uint64_t offset;
229          uint32_t iword;          uint32_t iword;
230          int hi6;          char *symbol;
         char *symbol, *mnem = "ERROR";  
231    
232          if (running)          if (running)
233                  dumpaddr = cpu->pc;                  dumpaddr = cpu->pc;

Legend:
Removed from v.19  
changed lines
  Added in v.20

  ViewVC Help
Powered by ViewVC 1.1.26