1 |
/* |
/* |
2 |
* Copyright (C) 2005-2006 Anders Gavare. All rights reserved. |
* Copyright (C) 2005-2007 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: |
25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: cpu.c,v 1.348 2006/07/20 21:52:59 debug Exp $ |
* $Id: cpu.c,v 1.389 2007/06/15 17:02:37 debug Exp $ |
29 |
* |
* |
30 |
* Common routines for CPU emulation. (Not specific to any CPU type.) |
* Common routines for CPU emulation. (Not specific to any CPU type.) |
31 |
*/ |
*/ |
39 |
#include "cpu.h" |
#include "cpu.h" |
40 |
#include "machine.h" |
#include "machine.h" |
41 |
#include "memory.h" |
#include "memory.h" |
42 |
#include "misc.h" |
#include "settings.h" |
43 |
|
#include "timer.h" |
44 |
|
|
45 |
|
|
46 |
|
extern size_t dyntrans_cache_size; |
47 |
|
extern int native_code_translation_enabled; |
48 |
|
|
49 |
static struct cpu_family *first_cpu_family = NULL; |
static struct cpu_family *first_cpu_family = NULL; |
50 |
|
|
51 |
|
|
54 |
* |
* |
55 |
* Create a new cpu object. Each family is tried in sequence until a |
* Create a new cpu object. Each family is tried in sequence until a |
56 |
* CPU family recognizes the cpu_type_name. |
* CPU family recognizes the cpu_type_name. |
57 |
|
* |
58 |
|
* If there was no match, NULL is returned. Otherwise, a pointer to an |
59 |
|
* initialized cpu struct is returned. |
60 |
*/ |
*/ |
61 |
struct cpu *cpu_new(struct memory *mem, struct machine *machine, |
struct cpu *cpu_new(struct memory *mem, struct machine *machine, |
62 |
int cpu_id, char *name) |
int cpu_id, char *name) |
64 |
struct cpu *cpu; |
struct cpu *cpu; |
65 |
struct cpu_family *fp; |
struct cpu_family *fp; |
66 |
char *cpu_type_name; |
char *cpu_type_name; |
67 |
|
char tmpstr[30]; |
68 |
|
|
69 |
if (name == NULL) { |
if (name == NULL) { |
70 |
fprintf(stderr, "cpu_new(): cpu name = NULL?\n"); |
fprintf(stderr, "cpu_new(): cpu name = NULL?\n"); |
71 |
exit(1); |
exit(1); |
72 |
} |
} |
73 |
|
|
74 |
cpu_type_name = strdup(name); |
CHECK_ALLOCATION(cpu_type_name = strdup(name)); |
|
if (cpu_type_name == NULL) { |
|
|
fprintf(stderr, "cpu_new(): out of memory\n"); |
|
|
exit(1); |
|
|
} |
|
75 |
|
|
76 |
cpu = zeroed_alloc(sizeof(struct cpu)); |
cpu = zeroed_alloc(sizeof(struct cpu)); |
77 |
|
|
78 |
cpu->memory_rw = NULL; |
CHECK_ALLOCATION(cpu->path = malloc(strlen(machine->path) + 15)); |
79 |
cpu->name = cpu_type_name; |
snprintf(cpu->path, strlen(machine->path) + 15, |
80 |
cpu->mem = mem; |
"%s.cpu[%i]", machine->path, cpu_id); |
81 |
cpu->machine = machine; |
|
82 |
cpu->cpu_id = cpu_id; |
cpu->memory_rw = NULL; |
83 |
cpu->byte_order = EMUL_LITTLE_ENDIAN; |
cpu->name = cpu_type_name; |
84 |
cpu->bootstrap_cpu_flag = 0; |
cpu->mem = mem; |
85 |
cpu->running = 0; |
cpu->machine = machine; |
86 |
|
cpu->cpu_id = cpu_id; |
87 |
|
cpu->byte_order = EMUL_UNDEFINED_ENDIAN; |
88 |
|
cpu->running = 0; |
89 |
|
|
90 |
|
cpu->sampling_paddr = zeroed_alloc(N_PADDR_SAMPLES * sizeof(uint64_t)); |
91 |
|
|
92 |
|
/* Create settings, and attach to the machine: */ |
93 |
|
cpu->settings = settings_new(); |
94 |
|
snprintf(tmpstr, sizeof(tmpstr), "cpu[%i]", cpu_id); |
95 |
|
settings_add(machine->settings, tmpstr, 1, |
96 |
|
SETTINGS_TYPE_SUBSETTINGS, 0, cpu->settings); |
97 |
|
|
98 |
|
settings_add(cpu->settings, "name", 0, SETTINGS_TYPE_STRING, |
99 |
|
SETTINGS_FORMAT_STRING, (void *) &cpu->name); |
100 |
|
settings_add(cpu->settings, "running", 0, SETTINGS_TYPE_UINT8, |
101 |
|
SETTINGS_FORMAT_YESNO, (void *) &cpu->running); |
102 |
|
|
103 |
cpu_create_or_reset_tc(cpu); |
cpu_create_or_reset_tc(cpu); |
104 |
|
|
128 |
|
|
129 |
fp->init_tables(cpu); |
fp->init_tables(cpu); |
130 |
|
|
131 |
|
if (cpu->byte_order == EMUL_UNDEFINED_ENDIAN) { |
132 |
|
fatal("\ncpu_new(): Internal bug: Endianness not set.\n"); |
133 |
|
exit(1); |
134 |
|
} |
135 |
|
|
136 |
return cpu; |
return cpu; |
137 |
} |
} |
138 |
|
|
139 |
|
|
140 |
/* |
/* |
141 |
|
* cpu_destroy(): |
142 |
|
* |
143 |
|
* Destroy a cpu object. |
144 |
|
*/ |
145 |
|
void cpu_destroy(struct cpu *cpu) |
146 |
|
{ |
147 |
|
if (cpu->sampling_timer != NULL) |
148 |
|
timer_remove(cpu->sampling_timer); |
149 |
|
|
150 |
|
settings_remove(cpu->settings, "name"); |
151 |
|
settings_remove(cpu->settings, "running"); |
152 |
|
|
153 |
|
/* Remove any remaining level-1 settings: */ |
154 |
|
settings_remove_all(cpu->settings); |
155 |
|
|
156 |
|
settings_destroy(cpu->settings); |
157 |
|
|
158 |
|
if (cpu->path != NULL) |
159 |
|
free(cpu->path); |
160 |
|
|
161 |
|
/* TODO: This assumes that zeroed_alloc() actually succeeded |
162 |
|
with using mmap(), and not malloc()! */ |
163 |
|
munmap((void *)cpu, sizeof(struct cpu)); |
164 |
|
} |
165 |
|
|
166 |
|
|
167 |
|
/* |
168 |
* cpu_tlbdump(): |
* cpu_tlbdump(): |
169 |
* |
* |
170 |
* Called from the debugger to dump the TLB in a readable format. |
* Called from the debugger to dump the TLB in a readable format. |
183 |
|
|
184 |
|
|
185 |
/* |
/* |
|
* cpu_register_match(): |
|
|
* |
|
|
* Used by the debugger. |
|
|
*/ |
|
|
void cpu_register_match(struct machine *m, char *name, |
|
|
int writeflag, uint64_t *valuep, int *match_register) |
|
|
{ |
|
|
if (m->cpu_family == NULL || m->cpu_family->register_match == NULL) |
|
|
fatal("cpu_register_match(): NULL\n"); |
|
|
else |
|
|
m->cpu_family->register_match(m, name, writeflag, |
|
|
valuep, match_register); |
|
|
} |
|
|
|
|
|
|
|
|
/* |
|
186 |
* cpu_disassemble_instr(): |
* cpu_disassemble_instr(): |
187 |
* |
* |
188 |
* Convert an instruction word into human readable format, for instruction |
* Convert an instruction word into human readable format, for instruction |
219 |
|
|
220 |
|
|
221 |
/* |
/* |
|
* cpu_gdb_stub(): |
|
|
* |
|
|
* Execute a "remote GDB" command. Return value is a pointer to a newly |
|
|
* allocated response string, if the command was successfully executed. If |
|
|
* there was an error, NULL is returned. |
|
|
*/ |
|
|
char *cpu_gdb_stub(struct cpu *cpu, char *cmd) |
|
|
{ |
|
|
if (cpu->machine->cpu_family == NULL || |
|
|
cpu->machine->cpu_family->gdb_stub == NULL) { |
|
|
fatal("cpu_gdb_stub(): NULL\n"); |
|
|
return NULL; |
|
|
} else |
|
|
return cpu->machine->cpu_family->gdb_stub(cpu, cmd); |
|
|
} |
|
|
|
|
|
|
|
|
/* |
|
|
* cpu_interrupt(): |
|
|
* |
|
|
* Assert an interrupt. |
|
|
* Return value is 1 if the interrupt was asserted, 0 otherwise. |
|
|
*/ |
|
|
int cpu_interrupt(struct cpu *cpu, uint64_t irq_nr) |
|
|
{ |
|
|
if (cpu->machine->cpu_family == NULL || |
|
|
cpu->machine->cpu_family->interrupt == NULL) { |
|
|
fatal("cpu_interrupt(): NULL\n"); |
|
|
return 0; |
|
|
} else |
|
|
return cpu->machine->cpu_family->interrupt(cpu, irq_nr); |
|
|
} |
|
|
|
|
|
|
|
|
/* |
|
|
* cpu_interrupt_ack(): |
|
|
* |
|
|
* Acknowledge an interrupt. |
|
|
* Return value is 1 if the interrupt was deasserted, 0 otherwise. |
|
|
*/ |
|
|
int cpu_interrupt_ack(struct cpu *cpu, uint64_t irq_nr) |
|
|
{ |
|
|
if (cpu->machine->cpu_family == NULL || |
|
|
cpu->machine->cpu_family->interrupt_ack == NULL) { |
|
|
/* debug("cpu_interrupt_ack(): NULL\n"); */ |
|
|
return 0; |
|
|
} else |
|
|
return cpu->machine->cpu_family->interrupt_ack(cpu, irq_nr); |
|
|
} |
|
|
|
|
|
|
|
|
/* |
|
222 |
* cpu_functioncall_trace(): |
* cpu_functioncall_trace(): |
223 |
* |
* |
224 |
* This function should be called if machine->show_trace_tree is enabled, and |
* This function should be called if machine->show_trace_tree is enabled, and |
226 |
*/ |
*/ |
227 |
void cpu_functioncall_trace(struct cpu *cpu, uint64_t f) |
void cpu_functioncall_trace(struct cpu *cpu, uint64_t f) |
228 |
{ |
{ |
229 |
|
int show_symbolic_function_name = 1; |
230 |
int i, n_args = -1; |
int i, n_args = -1; |
231 |
char *symbol; |
char *symbol; |
232 |
uint64_t offset; |
uint64_t offset; |
233 |
|
|
234 |
|
/* Special hack for M88K userspace: */ |
235 |
|
if (cpu->machine->arch == ARCH_M88K && |
236 |
|
!(cpu->cd.m88k.cr[M88K_CR_PSR] & M88K_PSR_MODE)) |
237 |
|
show_symbolic_function_name = 0; |
238 |
|
|
239 |
if (cpu->machine->ncpus > 1) |
if (cpu->machine->ncpus > 1) |
240 |
fatal("cpu%i:\t", cpu->cpu_id); |
fatal("cpu%i:\t", cpu->cpu_id); |
241 |
|
|
|
cpu->trace_tree_depth ++; |
|
242 |
if (cpu->trace_tree_depth > 100) |
if (cpu->trace_tree_depth > 100) |
243 |
cpu->trace_tree_depth = 100; |
cpu->trace_tree_depth = 100; |
244 |
for (i=0; i<cpu->trace_tree_depth; i++) |
for (i=0; i<cpu->trace_tree_depth; i++) |
245 |
fatal(" "); |
fatal(" "); |
246 |
|
|
247 |
|
cpu->trace_tree_depth ++; |
248 |
|
|
249 |
fatal("<"); |
fatal("<"); |
250 |
symbol = get_symbol_name_and_n_args(&cpu->machine->symbol_context, |
symbol = get_symbol_name_and_n_args(&cpu->machine->symbol_context, |
251 |
f, &offset, &n_args); |
f, &offset, &n_args); |
252 |
if (symbol != NULL) |
if (symbol != NULL && show_symbolic_function_name) |
253 |
fatal("%s", symbol); |
fatal("%s", symbol); |
254 |
else { |
else { |
255 |
if (cpu->is_32bit) |
if (cpu->is_32bit) |
296 |
*/ |
*/ |
297 |
void cpu_create_or_reset_tc(struct cpu *cpu) |
void cpu_create_or_reset_tc(struct cpu *cpu) |
298 |
{ |
{ |
299 |
size_t s = DYNTRANS_CACHE_SIZE + DYNTRANS_CACHE_MARGIN; |
size_t s = dyntrans_cache_size + DYNTRANS_CACHE_MARGIN; |
300 |
|
|
301 |
if (cpu->translation_cache == NULL) |
if (cpu->translation_cache == NULL) { |
302 |
cpu->translation_cache = zeroed_alloc(s); |
cpu->translation_cache = zeroed_alloc(s); |
303 |
|
|
304 |
|
if (native_code_translation_enabled) { |
305 |
|
mprotect(cpu->translation_cache, s, |
306 |
|
PROT_READ | PROT_WRITE | PROT_EXEC); |
307 |
|
} |
308 |
|
} |
309 |
|
|
310 |
/* Create an empty table at the beginning of the translation cache: */ |
/* Create an empty table at the beginning of the translation cache: */ |
311 |
memset(cpu->translation_cache, 0, sizeof(uint32_t) |
memset(cpu->translation_cache, 0, sizeof(uint32_t) |
312 |
* N_BASE_TABLE_ENTRIES); |
* N_BASE_TABLE_ENTRIES); |
390 |
* TODO: This should be refactored when redesigning the mainbus |
* TODO: This should be refactored when redesigning the mainbus |
391 |
* concepts! |
* concepts! |
392 |
*/ |
*/ |
393 |
for (te=0; te<machine->n_tick_entries; te++) { |
for (te=0; te<machine->tick_functions.n_entries; te++) { |
394 |
machine->tick_func[te](machine->cpus[0], |
machine->tick_functions.f[te](machine->cpus[0], |
395 |
machine->tick_extra[te]); |
machine->tick_functions.extra[te]); |
396 |
machine->tick_func[te](machine->cpus[0], |
machine->tick_functions.f[te](machine->cpus[0], |
397 |
machine->tick_extra[te]); |
machine->tick_functions.extra[te]); |
398 |
} |
} |
399 |
|
|
400 |
if (machine->show_nr_of_instructions) |
if (machine->show_nr_of_instructions) |
407 |
/* |
/* |
408 |
* cpu_show_cycles(): |
* cpu_show_cycles(): |
409 |
* |
* |
410 |
* If automatic adjustment of clock interrupts is turned on, then recalculate |
* If show_nr_of_instructions is on, then print a line to stdout about how |
411 |
* emulated_hz. Also, if show_nr_of_instructions is on, then print a |
* many instructions/cycles have been executed so far. |
|
* line to stdout about how many instructions/cycles have been executed so |
|
|
* far. |
|
412 |
*/ |
*/ |
413 |
void cpu_show_cycles(struct machine *machine, int forced) |
void cpu_show_cycles(struct machine *machine, int forced) |
414 |
{ |
{ |
416 |
char *symbol; |
char *symbol; |
417 |
int64_t mseconds, ninstrs, is, avg; |
int64_t mseconds, ninstrs, is, avg; |
418 |
struct timeval tv; |
struct timeval tv; |
419 |
int h, m, s, ms, d; |
struct cpu *cpu = machine->cpus[machine->bootstrap_cpu]; |
420 |
|
|
421 |
static int64_t mseconds_last = 0; |
static int64_t mseconds_last = 0; |
422 |
static int64_t ninstrs_last = -1; |
static int64_t ninstrs_last = -1; |
423 |
|
|
424 |
pc = machine->cpus[machine->bootstrap_cpu]->pc; |
pc = cpu->pc; |
425 |
|
|
426 |
gettimeofday(&tv, NULL); |
gettimeofday(&tv, NULL); |
427 |
mseconds = (tv.tv_sec - machine->starttime.tv_sec) * 1000 |
mseconds = (tv.tv_sec - cpu->starttime.tv_sec) * 1000 |
428 |
+ (tv.tv_usec - machine->starttime.tv_usec) / 1000; |
+ (tv.tv_usec - cpu->starttime.tv_usec) / 1000; |
429 |
|
|
430 |
if (mseconds == 0) |
if (mseconds == 0) |
431 |
mseconds = 1; |
mseconds = 1; |
433 |
if (mseconds - mseconds_last == 0) |
if (mseconds - mseconds_last == 0) |
434 |
mseconds ++; |
mseconds ++; |
435 |
|
|
436 |
ninstrs = machine->ninstrs_since_gettimeofday; |
ninstrs = cpu->ninstrs_since_gettimeofday; |
|
|
|
|
if (machine->automatic_clock_adjustment) { |
|
|
static int first_adjustment = 1; |
|
|
|
|
|
/* Current nr of cycles per second: */ |
|
|
int64_t cur_cycles_per_second = 1000 * |
|
|
(ninstrs-ninstrs_last) / (mseconds-mseconds_last); |
|
|
|
|
|
/* fatal("[ CYCLES PER SECOND = %"PRIi64" ]\n", |
|
|
cur_cycles_per_second); */ |
|
|
|
|
|
if (cur_cycles_per_second < 1000000) |
|
|
cur_cycles_per_second = 1000000; |
|
|
|
|
|
if (first_adjustment) { |
|
|
machine->emulated_hz = cur_cycles_per_second; |
|
|
first_adjustment = 0; |
|
|
} else { |
|
|
machine->emulated_hz = (15 * machine->emulated_hz + |
|
|
cur_cycles_per_second) / 16; |
|
|
} |
|
|
|
|
|
/* fatal("[ updating emulated_hz to %"PRIi64" Hz ]\n", |
|
|
machine->emulated_hz); */ |
|
|
} |
|
|
|
|
437 |
|
|
438 |
/* RETURN here, unless show_nr_of_instructions (-N) is turned on: */ |
/* RETURN here, unless show_nr_of_instructions (-N) is turned on: */ |
439 |
if (!machine->show_nr_of_instructions && !forced) |
if (!machine->show_nr_of_instructions && !forced) |
440 |
goto do_return; |
goto do_return; |
441 |
|
|
442 |
printf("[ %"PRIi64" instrs", (int64_t)machine->ninstrs); |
printf("[ %"PRIi64" instrs", (int64_t) cpu->ninstrs); |
|
|
|
|
if (!machine->automatic_clock_adjustment) { |
|
|
d = machine->emulated_hz / 1000; |
|
|
if (d < 1) |
|
|
d = 1; |
|
|
ms = machine->ninstrs / d; |
|
|
h = ms / 3600000; |
|
|
ms -= 3600000 * h; |
|
|
m = ms / 60000; |
|
|
ms -= 60000 * m; |
|
|
s = ms / 1000; |
|
|
ms -= 1000 * s; |
|
|
|
|
|
printf(", emulated time = %02i:%02i:%02i.%03i; ", h, m, s, ms); |
|
|
} |
|
443 |
|
|
444 |
/* Instructions per second, and average so far: */ |
/* Instructions per second, and average so far: */ |
445 |
is = 1000 * (ninstrs-ninstrs_last) / (mseconds-mseconds_last); |
is = 1000 * (ninstrs-ninstrs_last) / (mseconds-mseconds_last); |
448 |
is = 0; |
is = 0; |
449 |
if (avg < 0) |
if (avg < 0) |
450 |
avg = 0; |
avg = 0; |
451 |
printf("; i/s=%"PRIi64" avg=%"PRIi64, is, avg); |
|
452 |
|
if (cpu->has_been_idling) { |
453 |
|
printf("; idling"); |
454 |
|
cpu->has_been_idling = 0; |
455 |
|
} else |
456 |
|
printf("; i/s=%"PRIi64" avg=%"PRIi64, is, avg); |
457 |
|
|
458 |
symbol = get_symbol_name(&machine->symbol_context, pc, &offset); |
symbol = get_symbol_name(&machine->symbol_context, pc, &offset); |
459 |
|
|
460 |
if (machine->ncpus == 1) { |
if (machine->ncpus == 1) { |
461 |
if (machine->cpus[machine->bootstrap_cpu]->is_32bit) |
if (cpu->is_32bit) |
462 |
printf("; pc=0x%08"PRIx32, (uint32_t) pc); |
printf("; pc=0x%08"PRIx32, (uint32_t) pc); |
463 |
else |
else |
464 |
printf("; pc=0x%016"PRIx64, (uint64_t) pc); |
printf("; pc=0x%016"PRIx64, (uint64_t) pc); |
465 |
} |
} |
466 |
|
|
467 |
|
/* Special hack for M88K userland: (Don't show symbols.) */ |
468 |
|
if (cpu->machine->arch == ARCH_M88K && |
469 |
|
!(cpu->cd.m88k.cr[M88K_CR_PSR] & M88K_PSR_MODE)) |
470 |
|
symbol = NULL; |
471 |
|
|
472 |
if (symbol != NULL) |
if (symbol != NULL) |
473 |
printf(" <%s>", symbol); |
printf(" <%s>", symbol); |
474 |
printf(" ]\n"); |
printf(" ]\n"); |
487 |
*/ |
*/ |
488 |
void cpu_run_init(struct machine *machine) |
void cpu_run_init(struct machine *machine) |
489 |
{ |
{ |
490 |
machine->ninstrs_flush = 0; |
int i; |
491 |
machine->ninstrs = 0; |
for (i=0; i<machine->ncpus; i++) { |
492 |
machine->ninstrs_show = 0; |
struct cpu *cpu = machine->cpus[i]; |
493 |
|
|
494 |
/* For performance measurement: */ |
cpu->ninstrs_flush = 0; |
495 |
gettimeofday(&machine->starttime, NULL); |
cpu->ninstrs = 0; |
496 |
machine->ninstrs_since_gettimeofday = 0; |
cpu->ninstrs_show = 0; |
497 |
|
|
498 |
|
/* For performance measurement: */ |
499 |
|
gettimeofday(&cpu->starttime, NULL); |
500 |
|
cpu->ninstrs_since_gettimeofday = 0; |
501 |
|
} |
502 |
} |
} |
503 |
|
|
504 |
|
|
513 |
struct cpu_family *fp, *tmp; |
struct cpu_family *fp, *tmp; |
514 |
int res; |
int res; |
515 |
|
|
516 |
fp = malloc(sizeof(struct cpu_family)); |
CHECK_ALLOCATION(fp = malloc(sizeof(struct cpu_family))); |
|
if (fp == NULL) { |
|
|
fprintf(stderr, "add_cpu_family(): out of memory\n"); |
|
|
exit(1); |
|
|
} |
|
517 |
memset(fp, 0, sizeof(struct cpu_family)); |
memset(fp, 0, sizeof(struct cpu_family)); |
518 |
|
|
519 |
/* |
/* |
567 |
* cpu_init(): |
* cpu_init(): |
568 |
* |
* |
569 |
* Should be called before any other cpu_*() function. |
* Should be called before any other cpu_*() function. |
570 |
|
* |
571 |
|
* This function calls add_cpu_family() for each processor architecture. |
572 |
|
* ADD_ALL_CPU_FAMILIES is defined in the config.h file generated by the |
573 |
|
* configure script. |
574 |
*/ |
*/ |
575 |
void cpu_init(void) |
void cpu_init(void) |
576 |
{ |
{ |
577 |
/* Note: These are registered in alphabetic order. */ |
ADD_ALL_CPU_FAMILIES; |
|
|
|
|
#ifdef ENABLE_ALPHA |
|
|
add_cpu_family(alpha_cpu_family_init, ARCH_ALPHA); |
|
|
#endif |
|
|
|
|
|
#ifdef ENABLE_ARM |
|
|
add_cpu_family(arm_cpu_family_init, ARCH_ARM); |
|
|
#endif |
|
|
|
|
|
#ifdef ENABLE_AVR |
|
|
add_cpu_family(avr_cpu_family_init, ARCH_AVR); |
|
|
#endif |
|
|
|
|
|
#ifdef ENABLE_HPPA |
|
|
add_cpu_family(hppa_cpu_family_init, ARCH_HPPA); |
|
|
#endif |
|
|
|
|
|
#ifdef ENABLE_I960 |
|
|
add_cpu_family(i960_cpu_family_init, ARCH_I960); |
|
|
#endif |
|
|
|
|
|
#ifdef ENABLE_IA64 |
|
|
add_cpu_family(ia64_cpu_family_init, ARCH_IA64); |
|
|
#endif |
|
|
|
|
|
#ifdef ENABLE_M68K |
|
|
add_cpu_family(m68k_cpu_family_init, ARCH_M68K); |
|
|
#endif |
|
|
|
|
|
#ifdef ENABLE_MIPS |
|
|
add_cpu_family(mips_cpu_family_init, ARCH_MIPS); |
|
|
#endif |
|
|
|
|
|
#ifdef ENABLE_PPC |
|
|
add_cpu_family(ppc_cpu_family_init, ARCH_PPC); |
|
|
#endif |
|
|
|
|
|
#ifdef ENABLE_SH |
|
|
add_cpu_family(sh_cpu_family_init, ARCH_SH); |
|
|
#endif |
|
|
|
|
|
#ifdef ENABLE_SPARC |
|
|
add_cpu_family(sparc_cpu_family_init, ARCH_SPARC); |
|
|
#endif |
|
|
|
|
|
#ifdef ENABLE_TRANSPUTER |
|
|
add_cpu_family(transputer_cpu_family_init, ARCH_TRANSPUTER); |
|
|
#endif |
|
|
|
|
|
#ifdef ENABLE_X86 |
|
|
add_cpu_family(x86_cpu_family_init, ARCH_X86); |
|
|
#endif |
|
578 |
} |
} |
579 |
|
|