/[gxemul]/trunk/src/include/cpu.h
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/include/cpu.h

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

revision 22 by dpavlin, Mon Oct 8 16:19:37 2007 UTC revision 30 by dpavlin, Mon Oct 8 16:20:40 2007 UTC
# Line 28  Line 28 
28   *  SUCH DAMAGE.   *  SUCH DAMAGE.
29   *   *
30   *   *
31   *  $Id: cpu.h,v 1.62 2006/02/09 22:40:27 debug Exp $   *  $Id: cpu.h,v 1.90 2006/08/12 11:43:13 debug Exp $
32   *   *
33   *  CPU-related definitions.   *  CPU-related definitions.
34   */   */
# Line 43  Line 43 
43    
44  /*  /*
45   *  Dyntrans misc declarations, used throughout the dyntrans code.   *  Dyntrans misc declarations, used throughout the dyntrans code.
46     *
47     *  Note that there is place for all instruction calls within a page,
48     *  and then 2 more. The first one of these "extra" instruction slots is
49     *  the end-of-page slot. It transfers control to the first instruction
50     *  slot on the next (virtual) page.
51     *
52     *  The second of these extra instruction slots is an additional
53     *  end-of-page slot for delay-slot architectures. On e.g. MIPS, a branch
54     *  instruction can "nullify" (skip) the delay-slot. If the end-of-page
55     *  slot is skipped, then we end up one step after that. That's where the
56     *  end_of_page2 slot is. :)
57     *
58     *  next_ofs points to the next page in a chain of possible pages.
59     *  (several pages can be in the same chain, but only one matches the
60     *  specific physaddr.)
61     *
62     *  translations is a tiny bitmap indicating which parts of the page have
63     *  actual translations. Bit 0 corresponds to the lowest 1/32th of the page,
64     *  bit 1 to the second-lowest 1/32th, and so on.
65   */   */
66  #define DYNTRANS_MISC_DECLARATIONS(arch,ARCH,addrtype)  struct \  #define DYNTRANS_MISC_DECLARATIONS(arch,ARCH,addrtype)  struct \
67          arch ## _instr_call {                                   \          arch ## _instr_call {                                   \
# Line 52  Line 71 
71                                                                          \                                                                          \
72          /*  Translation cache struct for each physical page:  */        \          /*  Translation cache struct for each physical page:  */        \
73          struct arch ## _tc_physpage {                                   \          struct arch ## _tc_physpage {                                   \
74                  struct arch ## _instr_call ics[ARCH ## _IC_ENTRIES_PER_PAGE+1];\                  struct arch ## _instr_call ics[ARCH ## _IC_ENTRIES_PER_PAGE+2];\
75                  uint32_t        next_ofs;       /*  (0 for end of chain)  */ \                  uint32_t        next_ofs;       /*  (0 for end of chain)  */ \
76                  int             flags;                                  \                  uint32_t        translations;                           \
77                  addrtype        physaddr;                               \                  addrtype        physaddr;                               \
78          };                                                              \          };                                                              \
79                                                                          \                                                                          \
# Line 64  Line 83 
83                  addrtype        vaddr_page;                             \                  addrtype        vaddr_page;                             \
84                  addrtype        paddr_page;                             \                  addrtype        paddr_page;                             \
85                  unsigned char   *host_page;                             \                  unsigned char   *host_page;                             \
86                  int64_t         timestamp;                              \          };
87    
88    #define DYNTRANS_MISC64_DECLARATIONS(arch,ARCH,tlbindextype)            \
89            struct arch ## _l3_64_table {                                   \
90                    unsigned char   *host_load[1 << ARCH ## _L3N];          \
91                    unsigned char   *host_store[1 << ARCH ## _L3N];         \
92                    uint64_t        phys_addr[1 << ARCH ## _L3N];           \
93                    tlbindextype    vaddr_to_tlbindex[1 << ARCH ## _L3N];   \
94                    struct arch ## _tc_physpage *phys_page[1 << ARCH ## _L3N]; \
95                    struct arch ## _l3_64_table     *next;                  \
96                    int             refcount;                               \
97            };                                                              \
98            struct arch ## _l2_64_table {                                   \
99                    struct arch ## _l3_64_table     *l3[1 << ARCH ## _L2N]; \
100                    struct arch ## _l2_64_table     *next;                  \
101                    int                             refcount;               \
102          };          };
103    
104  /*  /*
# Line 87  Line 121 
121  #define DYNTRANS_ITC(arch)      struct arch ## _tc_physpage *cur_physpage;  \  #define DYNTRANS_ITC(arch)      struct arch ## _tc_physpage *cur_physpage;  \
122                                  struct arch ## _instr_call  *cur_ic_page;   \                                  struct arch ## _instr_call  *cur_ic_page;   \
123                                  struct arch ## _instr_call  *next_ic;       \                                  struct arch ## _instr_call  *next_ic;       \
124                                    struct arch ## _tc_physpage *physpage_template;\
125                                  void (*combination_check)(struct cpu *,     \                                  void (*combination_check)(struct cpu *,     \
126                                      struct arch ## _instr_call *, int low_addr);                                      struct arch ## _instr_call *, int low_addr);
127    
# Line 120  Line 155 
155   *   *
156   *  phys_page points to translation cache physpages.   *  phys_page points to translation cache physpages.
157   *   *
  *  phystranslation is a bitmap which tells us whether a physical page has  
  *  a code translation.  
  *  
158   *  vaddr_to_tlbindex is a virtual address to tlb index hint table.   *  vaddr_to_tlbindex is a virtual address to tlb index hint table.
159   *  The values in this array are the tlb index plus 1, so a value of, say,   *  The values in this array are the tlb index plus 1, so a value of, say,
160   *  3 means tlb index 2. A value of 0 would mean a tlb index of -1, which   *  3 means tlb index 2. A value of 0 would mean a tlb index of -1, which
# Line 134  Line 166 
166          unsigned char           *host_store[N_VPH32_ENTRIES];           \          unsigned char           *host_store[N_VPH32_ENTRIES];           \
167          paddrtype               phys_addr[N_VPH32_ENTRIES];             \          paddrtype               phys_addr[N_VPH32_ENTRIES];             \
168          struct arch ## _tc_physpage  *phys_page[N_VPH32_ENTRIES];       \          struct arch ## _tc_physpage  *phys_page[N_VPH32_ENTRIES];       \
         uint32_t                phystranslation[N_VPH32_ENTRIES/32];    \  
169          tlbindextype            vaddr_to_tlbindex[N_VPH32_ENTRIES];          tlbindextype            vaddr_to_tlbindex[N_VPH32_ENTRIES];
170    
171  /*  /*
# Line 144  Line 175 
175   *  Usage: e.g. VPH64(alpha,ALPHA,uint8_t)   *  Usage: e.g. VPH64(alpha,ALPHA,uint8_t)
176   *           or VPH64(sparc,SPARC,uint16_t)   *           or VPH64(sparc,SPARC,uint16_t)
177   *   *
178   *  TODO   *  l1_64 is an array containing poiners to l2 tables.
179     *
180     *  l2_64_dummy is a pointer to a "dummy l2 table". Instead of having NULL
181     *  pointers in l1_64 for unused slots, a pointer to the dummy table can be
182     *  used.
183   */   */
184  #define VPH64(arch,ARCH,tlbindextype)                   \  #define DYNTRANS_L1N            17
185          int dummy;  #define VPH64(arch,ARCH,tlbindextype)                                   \
186            struct arch ## _l3_64_table     *l3_64_dummy;                   \
187            struct arch ## _l3_64_table     *next_free_l3;                  \
188            struct arch ## _l2_64_table     *l2_64_dummy;                   \
189            struct arch ## _l2_64_table     *next_free_l2;                  \
190            struct arch ## _l2_64_table     *l1_64[1 << DYNTRANS_L1N];
191    
192    
193    /*  Include all CPUs' header files here:  */
194  #include "cpu_alpha.h"  #include "cpu_alpha.h"
195  #include "cpu_arm.h"  #include "cpu_arm.h"
196  #include "cpu_avr.h"  #include "cpu_avr.h"
# Line 160  Line 202 
202  #include "cpu_ppc.h"  #include "cpu_ppc.h"
203  #include "cpu_sh.h"  #include "cpu_sh.h"
204  #include "cpu_sparc.h"  #include "cpu_sparc.h"
205    #include "cpu_transputer.h"
206  #include "cpu_x86.h"  #include "cpu_x86.h"
207    
208  struct cpu;  struct cpu;
# Line 168  struct machine; Line 211  struct machine;
211  struct memory;  struct memory;
212    
213    
214    /*
215     *  cpu_family
216     *  ----------
217     *
218     *  This structure consists of various pointers to functions, performing
219     *  architecture-specific functions.
220     *
221     *  Except for the next and arch fields at the top, all fields in the
222     *  cpu_family struct are filled in by ecah CPU family's init function.
223     */
224  struct cpu_family {  struct cpu_family {
225          struct cpu_family       *next;          struct cpu_family       *next;
226          int                     arch;          int                     arch;
227    
228          /*  These are filled in by each CPU family's init function:  */          /*  Familty name, e.g. "MIPS", "Alpha" etc.  */
229          char                    *name;          char                    *name;
230    
231            /*  Fill in architecture specific parts of a struct cpu.  */
232          int                     (*cpu_new)(struct cpu *cpu, struct memory *mem,          int                     (*cpu_new)(struct cpu *cpu, struct memory *mem,
233                                      struct machine *machine,                                      struct machine *machine,
234                                      int cpu_id, char *cpu_type_name);                                      int cpu_id, char *cpu_type_name);
235    
236            /*  Initialize various translation tables.  */
237            void                    (*init_tables)(struct cpu *cpu);
238    
239            /*  List available CPU types for this architecture.  */
240          void                    (*list_available_types)(void);          void                    (*list_available_types)(void);
241    
242            /*  Read or write a CPU register, given a name.  */
243          void                    (*register_match)(struct machine *m,          void                    (*register_match)(struct machine *m,
244                                      char *name, int writeflag,                                      char *name, int writeflag,
245                                      uint64_t *valuep, int *match_register);                                      uint64_t *valuep, int *match_register);
246    
247            /*  Disassemble an instruction.  */
248          int                     (*disassemble_instr)(struct cpu *cpu,          int                     (*disassemble_instr)(struct cpu *cpu,
249                                      unsigned char *instr, int running,                                      unsigned char *instr, int running,
250                                      uint64_t dumpaddr, int bintrans);                                      uint64_t dumpaddr);
251    
252            /*  Dump CPU registers in readable format.  */
253          void                    (*register_dump)(struct cpu *cpu,          void                    (*register_dump)(struct cpu *cpu,
254                                      int gprs, int coprocs);                                      int gprs, int coprocs);
255          int                     (*run)(struct emul *emul,  
256                                      struct machine *machine);          /*  Dump generic CPU info in readable format.  */
257          void                    (*dumpinfo)(struct cpu *cpu);          void                    (*dumpinfo)(struct cpu *cpu);
258          void                    (*show_full_statistics)(struct machine *m);  
259            /*  Dump TLB data for CPU id x.  */
260          void                    (*tlbdump)(struct machine *m, int x,          void                    (*tlbdump)(struct machine *m, int x,
261                                      int rawflag);                                      int rawflag);
262    
263            /*  Assert an interrupt.  */
264          int                     (*interrupt)(struct cpu *cpu, uint64_t irq_nr);          int                     (*interrupt)(struct cpu *cpu, uint64_t irq_nr);
265    
266            /*  De-assert an interrupt.  */
267          int                     (*interrupt_ack)(struct cpu *cpu,          int                     (*interrupt_ack)(struct cpu *cpu,
268                                      uint64_t irq_nr);                                      uint64_t irq_nr);
269    
270            /*  Print architecture-specific function call arguments.
271                (This is called for each function call, if running with -t.)  */
272          void                    (*functioncall_trace)(struct cpu *,          void                    (*functioncall_trace)(struct cpu *,
273                                      uint64_t f, int n_args);                                      uint64_t f, int n_args);
274    
275            /*  GDB command handler.  */
276            char                    *(*gdb_stub)(struct cpu *, char *cmd);
277  };  };
278    
279    
# Line 207  struct cpu_family { Line 284  struct cpu_family {
284   *  into the cache, for possible translation cache structs for physical pages.   *  into the cache, for possible translation cache structs for physical pages.
285   */   */
286    
287  /*  Physpage flags:  */  /*  Meaning of delay_slot:  */
288  #define TRANSLATIONS                    1  #define NOT_DELAYED                     0
289  #define COMBINATIONS                    2  #define DELAYED                         1
290    #define TO_BE_DELAYED                   2
291    #define EXCEPTION_IN_DELAY_SLOT         8
292    
293    #define N_SAFE_DYNTRANS_LIMIT_SHIFT     14
294    #define N_SAFE_DYNTRANS_LIMIT   ((1 << (N_SAFE_DYNTRANS_LIMIT_SHIFT - 1)) - 1)
295    
296  #define DYNTRANS_CACHE_SIZE             (16*1048576)  #define DYNTRANS_CACHE_SIZE             (24*1048576)
297  #define DYNTRANS_CACHE_MARGIN           300000  #define DYNTRANS_CACHE_MARGIN           300000
298    
299  #define N_BASE_TABLE_ENTRIES            32768  #define N_BASE_TABLE_ENTRIES            32768
300  #define PAGENR_TO_TABLE_INDEX(a)        ((a) & (N_BASE_TABLE_ENTRIES-1))  #define PAGENR_TO_TABLE_INDEX(a)        ((a) & (N_BASE_TABLE_ENTRIES-1))
301    
302    
 #ifdef DYNTRANS_BACKEND  
   
 /*  TODO: convert this into a fixed-size array? Might increase performace.  */  
 struct dtb_fixup {  
         struct dtb_fixup        *next;  
         int                     type;   /*  Fixup type [optional]  */  
         void                    *addr;  /*  Address of the instruction  
                                             (in host memory)  */  
         size_t                  data;   /*  Emulation data.  */  
 };  
   
 struct translation_context {  
         /*  Current address of where to emit host instructions:  */  
         /*  (NULL means no translation is currently being done.)  */  
         void                    *p;  
   
         /*  index of the instr_call of the first translated instruction:  */  
         void                    *ic_page;  
         int                     start_instr_call_index;  
   
         /*  Fixups needed after first translation pass:  */  
         struct dtb_fixup        *fixups;  
   
         int                     n_simple;  
   
         /*  translation_buffer should have room for max_size bytes,  
             plus some margin.  */  
         unsigned char           *translation_buffer;  
         size_t                  cur_size;  
 };  
   
 #define DTB_TRANSLATION_SIZE_MAX        3072  
 #define DTB_TRANSLATION_SIZE_MARGIN     1024  
   
 void cpu_dtb_add_fixup(struct cpu *cpu, int type, void *addr, size_t data);  
 void cpu_dtb_do_fixups(struct cpu *cpu);  
   
 void dtb_host_cacheinvalidate(void *p, size_t len);  
 int dtb_function_prologue(struct translation_context *ctx, size_t *sizep);  
 int dtb_function_epilogue(struct translation_context *ctx, size_t *sizep);  
 int dtb_generate_fcall(struct cpu *cpu, struct translation_context *ctx,  
         size_t *sizep, size_t f, size_t instr_call_ptr);  
 int dtb_generate_ptr_inc(struct cpu *cpu, struct translation_context *ctx,  
         size_t *sizep, void *ptr, int amount);  
   
 #endif  /*  DYNTRANS_BACKEND  */  
   
   
   
303  /*  /*
304   *  The generic CPU struct:   *  The generic CPU struct:
305   */   */
# Line 275  struct cpu { Line 308  struct cpu {
308          /*  Pointer back to the machine this CPU is in:  */          /*  Pointer back to the machine this CPU is in:  */
309          struct machine  *machine;          struct machine  *machine;
310    
311            /*  CPU-specific name, e.g. "R2000", "21164PC", etc.  */
312            char            *name;
313    
314            /*  EMUL_LITTLE_ENDIAN or EMUL_BIG_ENDIAN.  */
315          int             byte_order;          int             byte_order;
316          int             running;  
317          int             dead;          /*  0-based CPU id, in an emulated SMP system.  */
         int             bootstrap_cpu_flag;  
318          int             cpu_id;          int             cpu_id;
         int             is_32bit;       /*  0 for 64-bit, 1 for 32-bit  */  
         char            *name;  
319    
320            /*  0 for emulated 64-bit CPUs, 1 for 32-bit.  */
321            int             is_32bit;
322    
323            /*  1 while running, 0 when paused/stopped.  */
324            int             running;
325    
326            /*  A pointer to the main memory connected to this CPU.  */
327          struct memory   *mem;          struct memory   *mem;
328    
329            int             (*run_instr)(struct cpu *cpu);
330          int             (*memory_rw)(struct cpu *cpu,          int             (*memory_rw)(struct cpu *cpu,
331                              struct memory *mem, uint64_t vaddr,                              struct memory *mem, uint64_t vaddr,
332                              unsigned char *data, size_t len,                              unsigned char *data, size_t len,
333                              int writeflag, int cache_flags);                              int writeflag, int cache_flags);
334          int             (*translate_address)(struct cpu *, uint64_t vaddr,          int             (*translate_v2p)(struct cpu *, uint64_t vaddr,
335                              uint64_t *return_addr, int flags);                              uint64_t *return_paddr, int flags);
336          void            (*update_translation_table)(struct cpu *,          void            (*update_translation_table)(struct cpu *,
337                              uint64_t vaddr_page, unsigned char *host_page,                              uint64_t vaddr_page, unsigned char *host_page,
338                              int writeflag, uint64_t paddr_page);                              int writeflag, uint64_t paddr_page);
# Line 298  struct cpu { Line 341  struct cpu {
341          void            (*invalidate_code_translation)(struct cpu *,          void            (*invalidate_code_translation)(struct cpu *,
342                              uint64_t paddr, int flags);                              uint64_t paddr, int flags);
343          void            (*useremul_syscall)(struct cpu *cpu, uint32_t code);          void            (*useremul_syscall)(struct cpu *cpu, uint32_t code);
344            int             (*instruction_has_delayslot)(struct cpu *cpu,
345                                unsigned char *ib);
346    
347            /*  The program counter. (For 32-bit modes, not all bits are used.)  */
348          uint64_t        pc;          uint64_t        pc;
349    
350  #ifdef TRACE_NULL_CRASHES          /*  See comment further up.  */
351          /*  TODO: remove this, it's MIPS only  */          int             delay_slot;
         int             trace_null_index;  
         uint64_t        trace_null_addr[TRACE_NULL_N_ENTRIES];  
 #endif    
352    
353            /*  The current depth of function call tracing.  */
354          int             trace_tree_depth;          int             trace_tree_depth;
355    
356          /*          /*
357             *  If is_halted is true when an interrupt trap occurs, the pointer
358             *  to the next instruction to execute will be the instruction
359             *  following the halt instruction, not the halt instrucion itself.
360             */
361            int             is_halted;
362    
363            /*
364           *  Dynamic translation:           *  Dynamic translation:
365             *
366             *  The number of translated instructions is assumed to be 1 per
367             *  instruction call. For each case where this differs from the
368             *  truth, n_translated_instrs should be modified. E.g. if 1000
369             *  instruction calls are done, and n_translated_instrs is 50, then
370             *  1050 emulated instructions were actually executed.
371             *
372             *  Note that it can also be adjusted negatively, that is, the way
373             *  to "get out" of a dyntrans loop is to set the current instruction
374             *  call pointer to the "nothing" instruction. This instruction
375             *  _decreases_ n_translated_instrs. That way, once the dyntrans loop
376             *  exits, only real instructions will be counted, and not the
377             *  "nothing" instructions.
378           */           */
         int             running_translated;  
379          int             n_translated_instrs;          int             n_translated_instrs;
380          unsigned char   *translation_cache;          unsigned char   *translation_cache;
381          size_t          translation_cache_cur_ofs;          size_t          translation_cache_cur_ofs;
 #ifdef DYNTRANS_BACKEND  
         struct translation_context translation_context;  
 #endif  
382    
383          /*          /*
384           *  CPU-family dependent:           *  CPU-family dependent:
385             *
386             *  These contain everything ranging from registers, memory management,
387             *  status words, etc.
388           */           */
389          union {          union {
390                  struct alpha_cpu   alpha;                  struct alpha_cpu      alpha;
391                  struct arm_cpu     arm;                  struct arm_cpu        arm;
392                  struct avr_cpu     avr;                  struct avr_cpu        avr;
393                  struct hppa_cpu    hppa;                  struct hppa_cpu       hppa;
394                  struct i960_cpu    i960;                  struct i960_cpu       i960;
395                  struct ia64_cpu    ia64;                  struct ia64_cpu       ia64;
396                  struct m68k_cpu    m68k;                  struct m68k_cpu       m68k;
397                  struct mips_cpu    mips;                  struct mips_cpu       mips;
398                  struct ppc_cpu     ppc;                  struct ppc_cpu        ppc;
399                  struct sh_cpu      sh;                  struct sh_cpu         sh;
400                  struct sparc_cpu   sparc;                  struct sparc_cpu      sparc;
401                  struct x86_cpu     x86;                  struct transputer_cpu transputer;
402                    struct x86_cpu        x86;
403          } cd;          } cd;
404  };  };
405    
# Line 343  struct cpu { Line 407  struct cpu {
407  /*  cpu.c:  */  /*  cpu.c:  */
408  struct cpu *cpu_new(struct memory *mem, struct machine *machine,  struct cpu *cpu_new(struct memory *mem, struct machine *machine,
409          int cpu_id, char *cpu_type_name);          int cpu_id, char *cpu_type_name);
 void cpu_show_full_statistics(struct machine *m);  
410  void cpu_tlbdump(struct machine *m, int x, int rawflag);  void cpu_tlbdump(struct machine *m, int x, int rawflag);
411  void cpu_register_match(struct machine *m, char *name,  void cpu_register_match(struct machine *m, char *name,
412          int writeflag, uint64_t *valuep, int *match_register);          int writeflag, uint64_t *valuep, int *match_register);
413  void cpu_register_dump(struct machine *m, struct cpu *cpu,  void cpu_register_dump(struct machine *m, struct cpu *cpu,
414          int gprs, int coprocs);          int gprs, int coprocs);
415  int cpu_disassemble_instr(struct machine *m, struct cpu *cpu,  int cpu_disassemble_instr(struct machine *m, struct cpu *cpu,
416          unsigned char *instr, int running, uint64_t addr, int bintrans);          unsigned char *instr, int running, uint64_t addr);
417    char *cpu_gdb_stub(struct cpu *cpu, char *cmd);
418  int cpu_interrupt(struct cpu *cpu, uint64_t irq_nr);  int cpu_interrupt(struct cpu *cpu, uint64_t irq_nr);
419  int cpu_interrupt_ack(struct cpu *cpu, uint64_t irq_nr);  int cpu_interrupt_ack(struct cpu *cpu, uint64_t irq_nr);
420  void cpu_functioncall_trace(struct cpu *cpu, uint64_t f);  void cpu_functioncall_trace(struct cpu *cpu, uint64_t f);
421  void cpu_functioncall_trace_return(struct cpu *cpu);  void cpu_functioncall_trace_return(struct cpu *cpu);
422  void cpu_create_or_reset_tc(struct cpu *cpu);  void cpu_create_or_reset_tc(struct cpu *cpu);
423  void cpu_run_init(struct machine *machine);  void cpu_run_init(struct machine *machine);
 int cpu_run(struct emul *emul, struct machine *machine);  
424  void cpu_run_deinit(struct machine *machine);  void cpu_run_deinit(struct machine *machine);
425  void cpu_dumpinfo(struct machine *m, struct cpu *cpu);  void cpu_dumpinfo(struct machine *m, struct cpu *cpu);
426  void cpu_list_available_types(void);  void cpu_list_available_types(void);
# Line 372  void cpu_init(void); Line 435  void cpu_init(void);
435  #define INVALIDATE_VADDR                8  #define INVALIDATE_VADDR                8
436  #define INVALIDATE_VADDR_UPPER4         16      /*  useful for PPC emulation  */  #define INVALIDATE_VADDR_UPPER4         16      /*  useful for PPC emulation  */
437    
 #define TLB_CODE                        0x02  
   
438    
439  #define CPU_FAMILY_INIT(n,s)    int n ## _cpu_family_init(              \  #define CPU_FAMILY_INIT(n,s)    int n ## _cpu_family_init(              \
440          struct cpu_family *fp) {                                        \          struct cpu_family *fp) {                                        \
# Line 384  void cpu_init(void); Line 445  void cpu_init(void);
445          fp->register_match = n ## _cpu_register_match;                  \          fp->register_match = n ## _cpu_register_match;                  \
446          fp->disassemble_instr = n ## _cpu_disassemble_instr;            \          fp->disassemble_instr = n ## _cpu_disassemble_instr;            \
447          fp->register_dump = n ## _cpu_register_dump;                    \          fp->register_dump = n ## _cpu_register_dump;                    \
         fp->run = n ## _cpu_run;                                        \  
448          fp->dumpinfo = n ## _cpu_dumpinfo;                              \          fp->dumpinfo = n ## _cpu_dumpinfo;                              \
449          fp->interrupt = n ## _cpu_interrupt;                            \          fp->interrupt = n ## _cpu_interrupt;                            \
450          fp->interrupt_ack = n ## _cpu_interrupt_ack;                    \          fp->interrupt_ack = n ## _cpu_interrupt_ack;                    \
451          fp->functioncall_trace = n ## _cpu_functioncall_trace;          \          fp->functioncall_trace = n ## _cpu_functioncall_trace;          \
452          return 1;                                                       \          fp->gdb_stub = n ## _cpu_gdb_stub;                              \
         }  
   
 #define CPU_OLD_FAMILY_INIT(n,s)        int n ## _cpu_family_init(      \  
         struct cpu_family *fp) {                                        \  
         /*  Fill in the cpu_family struct with valid data for this arch.  */ \  
         fp->name = s;                                                   \  
         fp->cpu_new = n ## _cpu_new;                                    \  
         fp->list_available_types = n ## _cpu_list_available_types;      \  
         fp->register_match = n ## _cpu_register_match;                  \  
         fp->disassemble_instr = n ## _cpu_disassemble_instr;            \  
         fp->register_dump = n ## _cpu_register_dump;                    \  
         fp->run = n ## _OLD_cpu_run;                                    \  
         fp->dumpinfo = n ## _cpu_dumpinfo;                              \  
         fp->show_full_statistics = n ## _cpu_show_full_statistics;      \  
453          fp->tlbdump = n ## _cpu_tlbdump;                                \          fp->tlbdump = n ## _cpu_tlbdump;                                \
454          fp->interrupt = n ## _cpu_interrupt;                            \          fp->init_tables = n ## _cpu_init_tables;                        \
         fp->interrupt_ack = n ## _cpu_interrupt_ack;                    \  
         fp->functioncall_trace = n ## _cpu_functioncall_trace;          \  
455          return 1;                                                       \          return 1;                                                       \
456          }          }
457    

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

  ViewVC Help
Powered by ViewVC 1.1.26