Revision aaed909a target-mips/translate.c
b/target-mips/translate.c | ||
---|---|---|
6725 | 6725 |
#endif |
6726 | 6726 |
} |
6727 | 6727 |
|
6728 |
CPUMIPSState *cpu_mips_init (void) |
|
6728 |
#include "translate_init.c" |
|
6729 |
|
|
6730 |
CPUMIPSState *cpu_mips_init (const char *cpu_model) |
|
6729 | 6731 |
{ |
6730 | 6732 |
CPUMIPSState *env; |
6733 |
const mips_def_t *def; |
|
6731 | 6734 |
|
6735 |
def = cpu_mips_find_by_name(cpu_model); |
|
6736 |
if (!def) |
|
6737 |
return NULL; |
|
6732 | 6738 |
env = qemu_mallocz(sizeof(CPUMIPSState)); |
6733 | 6739 |
if (!env) |
6734 | 6740 |
return NULL; |
6741 |
env->cpu_model = def; |
|
6742 |
|
|
6735 | 6743 |
cpu_exec_init(env); |
6736 | 6744 |
cpu_reset(env); |
6737 | 6745 |
return env; |
... | ... | |
6780 | 6788 |
#else |
6781 | 6789 |
env->hflags = MIPS_HFLAG_CP0; |
6782 | 6790 |
#endif |
6791 |
cpu_mips_register(env, env->cpu_model); |
|
6783 | 6792 |
} |
6784 |
|
|
6785 |
#include "translate_init.c" |
Also available in: Unified diff