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

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

revision 38 by dpavlin, Mon Oct 8 16:21:53 2007 UTC revision 44 by dpavlin, Mon Oct 8 16:22:56 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *   *
27   *   *
28   *  $Id: cpu_alpha.c,v 1.25 2007/03/26 02:01:35 debug Exp $   *  $Id: cpu_alpha.c,v 1.29 2007/06/28 13:36:46 debug Exp $
29   *   *
30   *  Alpha CPU emulation.   *  Alpha CPU emulation.
31   *   *
# Line 41  Line 41 
41  #include <ctype.h>  #include <ctype.h>
42    
43  #include "cpu.h"  #include "cpu.h"
44    #include "interrupt.h"
45  #include "machine.h"  #include "machine.h"
46  #include "memory.h"  #include "memory.h"
47  #include "misc.h"  #include "misc.h"
# Line 55  Line 56 
56  /*  Alpha symbolic register names:  */  /*  Alpha symbolic register names:  */
57  static char *alpha_regname[N_ALPHA_REGS] = ALPHA_REG_NAMES;  static char *alpha_regname[N_ALPHA_REGS] = ALPHA_REG_NAMES;
58    
59    void alpha_irq_interrupt_assert(struct interrupt *interrupt);
60    void alpha_irq_interrupt_deassert(struct interrupt *interrupt);
61    
62    
63  /*  /*
64   *  alpha_cpu_new():   *  alpha_cpu_new():
# Line 113  int alpha_cpu_new(struct cpu *cpu, struc Line 117  int alpha_cpu_new(struct cpu *cpu, struc
117                  CPU_SETTINGS_ADD_REGISTER64(alpha_regname[i],                  CPU_SETTINGS_ADD_REGISTER64(alpha_regname[i],
118                      cpu->cd.alpha.r[i]);                      cpu->cd.alpha.r[i]);
119    
120            /*  Register the CPU interrupt pin:  */
121            {
122                    struct interrupt template;
123    
124                    memset(&template, 0, sizeof(template));
125                    template.line = 0;
126                    template.name = cpu->path;
127                    template.extra = cpu;
128                    template.interrupt_assert = alpha_irq_interrupt_assert;
129                    template.interrupt_deassert = alpha_irq_interrupt_deassert;
130                    interrupt_handler_register(&template);
131            }
132    
133          return 1;          return 1;
134  }  }
135    
# Line 196  void alpha_cpu_tlbdump(struct machine *m Line 213  void alpha_cpu_tlbdump(struct machine *m
213    
214    
215  /*  /*
216     *  alpha_irq_interrupt_assert():
217     *  alpha_irq_interrupt_deassert():
218     */
219    void alpha_irq_interrupt_assert(struct interrupt *interrupt)
220    {
221            struct cpu *cpu = (struct cpu *) interrupt->extra;
222            cpu->cd.alpha.irq_asserted = 1;
223    }
224    void alpha_irq_interrupt_deassert(struct interrupt *interrupt)
225    {
226            struct cpu *cpu = (struct cpu *) interrupt->extra;
227            cpu->cd.alpha.irq_asserted = 0;
228    }
229    
230    
231    /*
232   *  alpha_print_imm16_disp():   *  alpha_print_imm16_disp():
233   *   *
234   *  Used internally by alpha_cpu_disassemble_instr().   *  Used internally by alpha_cpu_disassemble_instr().
# Line 639  int alpha_cpu_disassemble_instr(struct c Line 672  int alpha_cpu_disassemble_instr(struct c
672  #define MEMORY_RW       alpha_userland_memory_rw  #define MEMORY_RW       alpha_userland_memory_rw
673  #define MEM_ALPHA  #define MEM_ALPHA
674  #define MEM_USERLAND  #define MEM_USERLAND
675  #include "../memory_rw.c"  #include "memory_rw.c"
676  #undef MEM_USERLAND  #undef MEM_USERLAND
677  #undef MEM_ALPHA  #undef MEM_ALPHA
678  #undef MEMORY_RW  #undef MEMORY_RW

Legend:
Removed from v.38  
changed lines
  Added in v.44

  ViewVC Help
Powered by ViewVC 1.1.26